Welcome to the Monastery | |
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?? |
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)
updateFor clarification: \1 (mainly match part) is not to be confused with $1 (only replace part) of s/match/replace/
In Section
Seekers of Perl Wisdom
|
|