in reply to Simplifying regexes

Perl's and Perl-compatible regular expressions are so much extended compared to the original meaning of regular expressions in formal language theory that our Perl regular expressions are no longer "regular". The most obvious example is look-ahead and look-behind assertions, which are really not regular in the meaning of that word in the original "regular expressions" of formal languages (original regexes are supposed to be context-independent), but there are many other similar features that clearly contradict the original meaning of "regular".

You might find an interesting discussion (and quite a bit of information) about that (and about NFA vs. DFA regex engines and many other things) in Jeffrey Friedl's very good book, Mastering Regular Expression (O' Reilly), especially Chapter 4, "The Mechanics of Expression Processing".

Replies are listed 'Best First'.
Re^2: Simplifying regexes
by ExReg (Priest) on Oct 26, 2015 at 16:07 UTC

    Yes, I have read that portion several times. It has much good stuff in it, and I just need to read it some more. Perhaps I will be able to make it through it some day without my eyes glazing over first.