in reply to Grouped characters inside character class.
The word boundary device, \b, is useful for weeding out coincidental inclusion in "beyond". With space expected, you probably don't need it. You can try to match minimal or maximal length with quantifiers. I agree you're headed the wrong direction by trying to exclude characters. Does this do what you want?
if ($source =~ /posted by (.*?) on /i) { #do something with $1 }
Your code lacks a sigil on $source, and doesn't really do anything because it's evaluated in void context.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Grouped characters inside character class.
by the_0ne (Pilgrim) on Jun 02, 2006 at 03:54 UTC |