On 5/14/07, Jeff Pang <[EMAIL PROTECTED]> wrote: snip
Maybe a space following the "by" is needed? :)
snip
This what the word boundary character class is for
perl -le'
for ( "abc from to the word by and the end", "abc from to the end",
"abc from this byebye to this") {
print $1 if /from(.*?(?=\bby\b)|.*)/;
}
'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
