Re: using preg_match

From: Date: Wed, 16 May 2007 16:53:37 +0000
Subject: Re: using preg_match
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-255023@lists.php.net to get a copy of this message
Ed Curtis wrote:
Christian Haensel wrote:
Hi Ed, did you try the backslash as escape character? <? $path = "testing/realtors/userdata/"; if(preg_match("/\/realtors/", $path)) { echo 'Success'; } ?>
That's what did it. I was thinking the \ was the escape for the command but wanted to make sure. Thanks! Why didn't you just test it yourself? Most people (well, I hope) would try it out, find out it worked, and used it. Instead you asked it on a mailinglist, waited, and then got your answer. It took you longer to do this, it cost you more (because time is money!(TM)).... why....???


« previous php.general (#255023) next »