Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?:<(?:p|strong|em)\s*(?:[a-z]+=".+")?>){1,3}<<<\s*[a-z\s-]+\s*>>>(?:<\/(?:p|strong|em)\s*>){1,3}
/
ig
Input 1
1
New
<p style="text-align: center;"><strong><em><<< Please consider helping us financially with your tax-deductible contribution today >>></em></strong></p> <p><em style="color: purple;"><strong class="words"><<< Please consider helping us financially with your tax-deductible contribution today >>></strong></em></p> //Note: Incorrect markup might still match correctly. In the example below, there is a //block element (p) inside an inline element (em), the tags are in the wrong order, and //the em has no closing tag. <em><p><strong><<<TEST>>></p></strong>