Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Why aren't perl regular expressions really regular expressions?

by LanX (Saint)
on Mar 17, 2015 at 10:22 UTC ( [id://1120303]=note: print w/replies, xml ) Need Help??


in reply to Why aren't perl regular expressions really regular expressions?

Simplified: real regular expressions have a narrowly defined semantic and are implemented as a state machine while perl emulates this with kind of op-codes for higher flexibility and richer syntax (like mentioned \1 back reference or embedded perl code)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

update

For clarification:

\1 (mainly match part) is not to be confused with $1 (only replace part) of s/match/replace/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-29 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found