Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
@if(?:\s+|)\(([\s\S]*?)\)([\s\S]*?)+@endif
/
i
Test String
New
<div class="wrapper"> <p>Parágrafo fora dos ifs.</p> @if (true) <div>Oi?</div> @if (false) <span>Não devo ser renderizado</span> @endif @endif <p>Estou entre os if's</p> @if (true) <div>estou em outro if</div> @endif </div>
Substitution
Processing...