3 ms·
Yeah. True regular expressions, which is to say the Kleene kind, are a lovely tool for testing membership in a given regular grammar. However what we call rege
by User23 4y ago
Yeah. True regular expressions, which is to say the Kleene kind, are a lovely tool for testing membership in a given regular grammar.
However what we call regexes today are, often, a considerably more theoretically powerful tool that can match some[1] non-regular languages. Programmers are tempted to use them as a general purpose matcher, which they absolutely are not. Thus, the punchline of the joke.
[1] As far as I know the exact computational power of perlre isn't proved, but it can describe some subset of the context-free languages at the very least.