| Posted by Steve on 11/12/07 17:51 
<ross.oneill@gmail.com> wrote in message news:1194732358.847042.123900@50g2000hsm.googlegroups.com...
 > Thanks for your response.  But if in your example
 > strVar "Bob is from Canada"  -- would return true when I want it to
 > return false.
 
 people shy away from regex...but, i don't know why.
 
 /\bca(\b|$)/i
 
 preg_match 'Bob is from Canada' returns false
 
 preg_match 'Bill is from San Diego, CA' returns true.
 
 
 
 you'd be hard-pressed to write anything more simple or manageable.
 [Back to original message] |