Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
\h*+[^\s{}][^{}]*{(?:[^{}](224,13,78)?)++[^{}]*+}(?(1)(*SKIP)(*F))\R*
/
gm
Input 1
1
New
h1 { color: rgb(224,13,78); } h1 { display: block; /* Delete this whole block */ } #test-color { color: rgb(224,13,78); } .test-position { position: absolute; /* Delete this whole block */ } .test-bg-color { background-color: rgba(224,13,78,0.5); } @media ( max-width: 1200px ) { .test-color { color: rgb(224,13,78); } .test-position { overflow: hidden; /* Delete this whole block */ } }
Extraction
h1 { color: rgb(224,13,78); } h1 { display: block; /* Delete this whole block */ } #test-color { color: rgb(224,13,78); } .test-position { position: absolute; /* Delete this whole block */ } .test-bg-color { background-color: rgba(224,13,78,0.5); } @media ( max-width: 1200px ) { .test-color { color: rgb(224,13,78); } .test-position { overflow: hidden; /* Delete this whole block */ } }