Re: Newbie - is there a function similar to the sql 'like' comparison operator?

From: Date: Fri, 09 May 2008 08:56:48 +0000
Subject: Re: Newbie - is there a function similar to the sql 'like' comparison operator?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-274053@lists.php.net to get a copy of this message
revDAVE wrote:
Newbie - is there a function similar to the sql 'like' comparison operator? I would like to be able to compare 2 strings: If $this ---*like or similar to*--- $that That type of thing...
I strongly suggest you read up on regular expressions: http://uk.php.net/manual/en/book.regex.php Knowing how to use regular expressions is a a very handy skill. I do a lot of mass changing of files via the command line with tools such as grep, sed and awk and a mastery regular expressions can save hours of laborious typing and find/replacing ;) Reminds me of one of my favourite xkcd cartoons: http://xkcd.com/208/ Col

« previous php.general (#274053) next »