Originally Posted by DiapDealer
Which would exclude paragraphs that had no attributes. Why not:
(space after the 1)
Reread my regex. I did think of that.
Nitpick: I used an optional capture group, which includes a space (because as a general idea, I like demanding spaces after the tag name and before the attribute, to avoid matching the wrong tags) -- but your regex does not need a ? because the star already covers that.