Reputation: 5457
I have a regular expression which is replacing all of the opening except for <b></b>
tags, which it ignores. How would I also add an expression to ignore <i></i>
tags?
/<(?!\/?b(?=>|\s.*>))\w[^>]*>/gm
Upvotes: 1
Views: 168
Reputation: 626689
Use <(?!\/?[bi](?=>|\s.*>))\w[^>]*>
regex.
[bi]
means either 'b' or 'i'.
Upvotes: 1