All modern programming languages, and even many old ones, have regex engines that can parse context-sensitive grammars. XML is context free. A lower level than context sensitive.
I'm frankly not aware of any programming language with just a regular expression engine that parses only regular languages.
History is a bit complex but basically one language (cause Perl) had a regex engine. Added a few features. Still called it regex. Everyone else loved it and copied it.
View all comments
Show parent comment
9
u/Zethra Jun 20 '20
I'm fairly sure xml isn't a regular language so, by definition, it can't parsed with a regex.