Why Are Not Perls Patterns Regular Expressions

Why Are Not Perls Patterns Regular Expressions


  • 1 Jan, 2012

    Because Perl patterns have backreferences.A regular expression by definition must be able to determine the next state in the finite automaton without requiring any extra memory to keep around previous state. A pattern /([ab]+)c1/ requires the state machine to remember old states, and thus disqualifies such patterns as being regular expressions in the classic sense of the term.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.