Basically this applies in your case because recognizing if a sequence of characters is in a comment block or not for HTML is likely not expressible using regexes.There may be a way for a very controlled restricted subset of HTML, but it might require some complex regexes.