Hacker News new | ask | show | jobs
by unlinkr 2482 days ago
That is a valid XHTML tag (if I remember correctly) and can be matched perfectly fine by a regex.
1 comments

Perhaps something like "([^"]*)" could skip what is inside the string literal. Unless there is "<input" in the string literal, then where you start parsing becomes very important.
That pattern would indeed match a quoted string. I don't see how it would matter if the quoted string contains something like "<input". It can contain anything except a quote character.
It just makes the starting offset of the regex input important.
Sure. But that would be true for any parsing technique. No parser known to man would be able to produce a valid parse if you start it in the middle of a quoted string!