Re: preg_match not working
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: preg_match not working

From: Andrew Richardson <andrew@ar106REMOVETHIS.wanadoo.co.uk>
Date: Tue Mar 07 2006 - 00:07:33 CET

p wrote:

> You still need to wrap the regex in slashes I believe:
>
> $result = preg_match("/[0-9][0-9]/","12")
> $result = preg_match("/hello/","hello")
>
> Hope that helps,
> Pete

Ah, that would be it. I feel a bit silly now! :)

Thanks!
Received on Mon May 1 02:28:33 2006