What class of language can Perl regular expressions be used against?
Asked Answered
W

1

7

I know that some of the capabilities of the Perl regular expression engine are not regular. However, what class is it? It might be context-free, but CS theory was never my strongest subject.

Worm answered 30/9, 2009 at 14:5 Comment(6)
I'm curious as to why people are downvoting/marking to close...explanations?Worm
haha i love how this has a vote to close for being subjective and argumentative! just bc two of the answers so far (one was deleted) haven't even addressed the question, does not mean close it. and how is this subjective? this isn't a question of what should it be; it's a question of what it is, which is objective.Tracitracie
Funny that something about maths and formal languages was considered as subjective :pEldwun
The marked answer's link does not give a complete answer to the question,What is the class of languages that Perl regexes can recognize?Patrick
Paul: Yes, it does: "Many features found in modern regular expression libraries provide an expressive power that far exceeds the regular languages." and "This has led to a nomenclature where the term regular expression has different meanings in formal language theory and pattern matching."Worm
That doesn't define the answer, that simply says what the answer is not.Patrick
T
3

Actually, many implementations are neither regular nor context-free; patterns have become their own beast. This Wikipedia article has more on this, including a bit from Larry Wall, the author of the Perl language.

Tracitracie answered 30/9, 2009 at 14:27 Comment(1)
I was just going to link to this exact same page :)Eldwun

© 2022 - 2024 — McMap. All rights reserved.