ie.
a b i u ol ul li
tag does not match but
br
and any other tag matches.
Thanks in advance.
The regex i got atm is
/<([a-zA-Z]{2,})\b[^>]*>/g
which does not satisfy not matching ul and ol
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is probably what you want (it will only match open tag, by the way, since I mimic what you have):
I allow optional space after
<and before>.I use negative look ahead
(?![uo]l\b)to check the tag is not eitherulorol. I throw in a word boundary check\bto make sure it is not part of some user-defined tag.I assume the tag name contains only English alphabet. You can modify the regex if this assumption does not hold.