in reply to RegEx for incorrectly closed HTML attribute?

well, if you're just interested in finding unmatched quotes, you could print "unmatched quote" if tr/"// %2;, but you might be interested in making sure people close tags, and otherwise generate valid html. That might not involve a regex, though.