Quote:
Originally Posted by eschwartz
Reread my regex. I did think of that.
|
My bad. I didn't notice the space was
inside the optional grouping. Part of the reason I don't like to use a lot of extraneous grouping in my regex.
Quote:
Originally Posted by eschwartz
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)
|
If you're worried about matching the wrong tags (like <image for <i), just make sure there's a word break after the element name.
Or if you're in calibre's editor, even the end-of-word match: