in reply to Why aren't perl regular expressions really regular expressions?
The term "Regular Expression" originally comes from computer science. The set of Regular Languages is more or less equivalent to the set of Regular Expressions, but it is smaller than the set of languages accepted by Perl regular expressions. As the documentation already says, for example backreferences cannot be expressed in a Regular Expression and are not available in the set of Regular Languages.
Update
Any Regular Expression has a finite number of states. Arbitrary backreferences cannot be expressed in a fixed automaton with a finite number of states. This means that backreferences are not available in Regular Expressions.
|
---|