DB<21> $test = qq|Some test. This is a test-with a dash. We want to m +atch test here| DB<22> x $test =~ /\b(test)(?!-)\b/g 0 'test' 1 'test' DB<23> print pos($test),":$1\n" while $test =~ /\b(test)(?!-)\b/g 9:test 60:test
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re: Regex boundary match (updated demo code)
by LanX
in thread Regex boundary match
by ultranerds
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |