in reply to Re: Basic Regular expression
in thread Basic Regular expression
Start then capture 1 or more character upto "e" or "r"
If it was true, the OP would have received
instead of$1="This is P"; $2="e"; $3="rl";
$1="This is Pe"; $2="r"; $3="l";
It actually matches until the end of the line as the OP expects, but its then forced to backtrack until it finds a position that's followed by e or r.
|
---|
In Section
Seekers of Perl Wisdom