snippets

Regex Search in value

Use MongoDB to find a regex term inside field values.


26 September 2011 • 1 min read

mongodb regex
<?php
MyClass::find([
	'thanks.for' => [
		'$regex' => "/*understanding*"
	]
]);

Published on 26 September 2011

mongodb regex

Other content you may be interested in....

Hard reboot of Server

Hard reboot of Server

You never want to do it, you should never need to, but sweet mary when you have to, beware of hangs.

1 min read