Fixing regular expression to support input elements and multi-line tags