The tragedy of this SO question is that XHTML open tags are strictly regular and a regex will match them just fine http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags …
-
-
This is called an "XX problem". "No, I really do need what I asked for. Please stop second-guessing me and answer the question as stated"
-
"Why do you want to do that?" is frequently code for "I don't know how to do that."
- 4 more replies
New conversation -
-
-
@qntm fairly sure they use context-free grammars instead -
@zarawesome because, as you've found out, even a simple open tag is madness to identify with a regex
End of conversation
New conversation -
-
-
@qntm When writing a tokenizer, you don't treat "any opening tag" as a single token. As in your gist, you combine smaller tokens with rules. -
@qntm Perl 6 "Rules", interestingly, have facilities such as "ratchet" and "Grammars" for use in such tasks, but go beyond "true regexes".
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.