Friday, 16 November 2012

Why Perl patterns are not regular expressions? | Perl Scripting Interiew Questions

Perl patterns have back references
By the definition, a regular expression should determine next state in finite automaton without extra money to keep in previous state. State machine is required by the pattern / ([ab] +) c1/ to remember old states. Such patterns are disqualified as being regular expressions in the term’s classic sense.

No comments: