Im not too good with regular expressions, but I need a regular expression to do a mongo search in php for emails in a string like this:
[to]=>'[email protected], [email protected], [email protected], [email protected]'
My specific problem is that I can't get a expression to work to find specifically [email protected]
but not [email protected]
.
I used something like this ['$regex'] = new MongoRegex("/(\W)(".$email.")/");
but then this doesn't find [email protected]
because it has no space in front of it. Any help is appreciated.