NYCPHP Meetup

NYPHP.org

[nycphp-talk] Regex & Delimiter Trouble

Dan Cech dcech at phpwerx.net
Fri Nov 19 16:52:55 EST 2004


Daniel J Cain Jr. wrote:
> Still getting the same warnings as before and the "DOH!" after changing 
> the pattern to single quotes on my system

You also have pattern and haystack reversed in the preg_match call ... 
DOH indeed!

Dan

> On Nov 19, 2004, at 3:30 PM, Dan Cech wrote:
> 
>> Use single quotes, the $ is screwing up the regex.
>>
>> $pattern = '/^quantity[1-9][0-9]{0,2}$/';
>>
>> Dan
>>
> 
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org




More information about the talk mailing list