2 ms·
Wrapping up As the article was quite long, here a summary of the main points: - The “regular expressions” used by programmers have very little in common with t
by Kenji 8y ago
Wrapping up
As the article was quite long, here a summary of the main points:
- The “regular expressions” used by programmers have very little in common with the original notion of regularity in the context of formal language theory.
- Regular expressions (at least PCRE) can match all context-free languages. As such they can also match well-formed HTML and pretty much all other programming languages.
- Regular expressions can match at least some context-sensitive languages.
- Matching of regular expressions is NP-complete. As such you can solve any other NP problem using regular expressions.
I wish he wrote that in the beginning of the article. Would have saved me a lot of skimming (I already know grammar theory).