in reply to Re: Regex help
in thread Regex help

Let's say I've the following:

$sentence: That is naughty cat.
$symbol: naugh

That passes the test but I need it to fail because "naugh" is only part of "naughty".

Replies are listed 'Best First'.
Re^3: Regex help
by Anonymous Monk on Jan 14, 2006 at 16:32 UTC
    Sorry, what I meant to say is: If I removed the two '\b', a partial word and a comma are both matched. But what I need is to match either a comma or a complete word in the given sentence.