| Posted by The Natural Philosopher on 01/19/08 16:08 
Toby A Inkster wrote:> Michael Fesser wrote:
 >> .oO(wes.waters@gmail.com)
 >>
 >>> I haven't seen any documentation on this, and searching for !~ has been
 >>> fruitless.  Any suggestions, or is there no equivalent?
 >> What about !preg_match()?
 >> Just a guess, since I don't use Perl.
 >
 > Yep, that's correct.
 >
 > Perl:
 >
 > 	if ($foo !~ /bar/)
 > 	{
 > 		print "match\n";
 > 	}
 >
 > PHP:
 >
 > 	if (!preg_match('/bar/', $foo))
 > 	{
 > 		print "match\n";
 > 	}
 >
 >
 And apart from reminding me of 'pregnancy' how much more readable the
 PHP is!
 [Back to original message] |