NYCPHP Meetup

NYPHP.org

[nycphp-talk] Regex & Delimiter Trouble

Sol Toure sol2ray at gmail.com
Fri Nov 19 17:07:43 EST 2004


On Fri, 19 Nov 2004 15:15:36 -0600, Daniel J Cain Jr. <dan at cain.sh> wrote:
> Given this script:
> 
> <?php
> $pattern = "/^quantity[1-9][0-9]{0,2}$/";
> $haystack = "quantity11";
> echo (preg_match($haystack, $pattern)) ? 'We got one!': 'DOH!', "\n";
> ?>

It should be :   preg_match($pattern, $haystack)



More information about the talk mailing list