I want to match all "new line" type html tags (breaks and paragraphs) no matter how many and in what order they appear, so long as they appear at the beginning of a line.
This regex pattern matches the first one:
^<[Bb][Rr] ?/?>|^<[Pp]>
So, given this text <p><br>fred
, it would match the first <p>
but not the immediately following <br>
also.
Note that I don't want to remove every one of these tags, but only those which appear at the beginning of the input line.