in reply to Re: Regular Expression match too much
in thread Regular Expression match too much

Nice tip, but that should be m/\b(?:$criteria)\b/.

print('BOTTOM' =~ m/\b$criteria\b/ ?1:0, "\n"); # 1 print('BOTTOM' =~ m/\b(?:$criteria)\b/ ?1:0, "\n"); # 0

Replies are listed 'Best First'.
Re^3: Regular Expression match too much
by GrandFather (Saint) on Feb 08, 2006 at 20:11 UTC

    Hmm, sneeky. I come here to learn, I learned :). Thankyou.


    DWIM is Perl's answer to Gödel