in reply to Help with matching .org
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)/){ ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with matching .org
by bestresearch2 (Novice) on Jan 09, 2008 at 15:11 UTC | |
by bestresearch2 (Novice) on Jan 09, 2008 at 16:02 UTC | |
by johngg (Canon) on Jan 09, 2008 at 17:21 UTC |