4 ms·
While it is true for Regular Languages (FSM) strict RegExs, it's hardly true for any contemporary implementation of RegExs. They have back references and other
by hvidgaard 10y ago
While it is true for Regular Languages (FSM) strict RegExs, it's hardly true for any contemporary implementation of RegExs. They have back references and other constructs that make them more powerful than a Regular Language, and thereby make it impossible to decide equivalence in the general case.
- wyager 10y agoHence "not to be confused with PCREs", which most pseudo-regex implementations are based off of.
- Hydraulix989 10y agoI'll ask the "dumb question" then: What is a PCRE? How is it different than a "true" regex?
- robewald 10y agoPCREs are Perl Compatible Regular Expressions, they have backreferences and other constructs. Almost all languages that have Regular Expressions have similar constructs. "Computer Science" Regular Expressions are more limited and implement a "regular language" as defined in https://en.wikipedia.org/wiki/Chomsky_hierarchy https://en.wikipedia.org/wiki/Chomsky_hierarchy. This gives some guarantees, which go out the window with PCREs.
- hvidgaard 10y agoDid you edit the comment? I cannot recall reading that at all, but I may have been in a hurry.
- wyager 10y agoNope, didn't change it!