Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Basic Regular expression

by ikegami (Patriarch)
on Feb 09, 2017 at 18:00 UTC ( [id://1181555]=note: print w/replies, xml ) Need Help??


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

$1="This is P"; $2="e"; $3="rl";
instead of
$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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1181555]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-03-28 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found