In this case your regexp should look something like this:
# custom word boundary: my $wb = qr{ ^ | $ | \s }x; # you have to take care if you are checking for a left or a right word + boundary: if ($str =~ m/(?<=$wb)$termstr1(?=$wb)/){ ... }
In reply to Re: Help with matching .org
by moritz
in thread Help with matching .org
by bestresearch2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |