23 ms·
You're correct. Regular grammars are type-3 grammars in the Chomsky hierarchy, and those can be recognized by regular expressions (this is the definition of reg
by algorias 13y ago
You're correct. Regular grammars are type-3 grammars in the Chomsky hierarchy, and those can be recognized by regular expressions (this is the definition of regexes in the CS sense).
In practice, however, the regex engines of most programming languages have features that makes them capable of recognizing (a subset of?) type-2 grammars, hence the confusion.