I've a piece of code as follows:
$symbol can be a word or a comma. The above regex doesn't work if $symbol is a comma. Basically I wanted to test for the presence of $symbol in $sentence.if ($sentence =~ /\b$symbol\b/) { # do something }
Please enlighten me.
TIA :)
In reply to Regex help by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |