a html tag always starts with <[a-z], < [a-z] is invalid a space can be found after the = in href='bleh' This function is taking 10% of the compilation time, with caching enabled, maybe it's worth optimising the regexp a bit more, I don't know.