3 ms·
A regex can be used effectively to tokenize XML-like markup, including a lot of HTML—sometimes called shallow parsing. https://stackoverflow.com/a/6638578/23482
by jdnier 9y ago
A regex can be used effectively to tokenize XML-like markup, including a lot of HTML—sometimes called shallow parsing. https://stackoverflow.com/a/6638578/234823 https://stackoverflow.com/a/6638578/234823
Attribute value minimization would be one limitation, since that regex is for XML, but it's a more robust approach than writing naive "<x>.*</x>"-style regexes.
- AceJohnny2 9y ago> A regex can be used effectively to tokenize XML-like markup ...isn't that how all tokenizers for all (confusingly-named) context-free languages work?