moriquende@lemmy.worldtoProgrammer Humor@lemmy.ml•The best answer on StackOverflow: Using RegEx to parse HTML
5·
14 days agoYou can’t parse every html opening tag with regex, because a html opening tag doesn’t have a set structure. How would you match, with regex, this opening tag?
<mytag myattribute="<value of \"myattribute\">" >
The quote must not be escaped when you start with a single quote. The rest doesn’t. This is valid and tested:
<img alt='my "<img>"'>