3 ms·
Well, most commonly used features like back-references allow to define not-regular language, so there is nothing funny that most regular expression engines are
by stplsd 8y ago
Well, most commonly used features like back-references allow to define not-regular language, so there is nothing funny that most regular expression engines are not "regular".
I like to use term regex for "regular" expressions implemented in most languages, by PCRE engine or in Perl and term regular expressions for actual regular expressions as defined in theoretical computer science, that is expressions which can be recognised by finite (either deterministic or non-deterministic) automata.
- coldtea 8y ago>Well, most commonly used features like back-references allow to define not-regular language, so there is nothing funny that most regular expression engines are not "regular". The funny thing is that they're still called regular.
- arayh 8y agoWould it make sense to classify them as irregular expressions?
- empath75 8y agoI think most people call them extended regular expressions.
- coldtea 8y agoMaybe, but there's an actual hierarchy of languages (or grammars) based on expression capability -- regular languages are at the base. There's (in more powerful order): context-free, context-sensitive, recursively-enumerable. https://en.wikipedia.org/wiki/Chomsky_hierarchy https://en.wikipedia.org/wiki/Chomsky_hierarchy