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....

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


1 min read

linux

You're forking about with PHP - way to go! Then it spawns itself because of a bad dev script and you need to kill it in a jiffy.


2 min read

linux php concurrency

bodged with ♥ in NCL, AMS, NAP, NYC, BOS and LDN