Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Simplifying regexes

by Laurent_R (Canon)
on Oct 26, 2015 at 16:02 UTC ( [id://1145988]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1145988]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found