2011-09-26· snippet · 1 min · 10 words · #mongodb · #regex

Regex Search in value

Use MongoDB to find a regex term inside field values.

Regex Search in value
<?php
MyClass::find([
	'thanks.for' => [
		'$regex' => "/*understanding*"
	]
]);
Subscribe to the RSS feed for updates.
next
Killing Linux programmes by name ↗
previous
Hard reboot of Server ↗
reply
[email protected]