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
/
((\s*?(?:\/\*[\s\S]*?\*\/)?\s*?@media[\s\S]*?){([\s\S]*?)(?!.*}})}\s*?(?:}))|(([\s\S]*?){([\s\S]*?)(?![\s\S]?}})[\s\S]})
/
gi
Input 1
New
.someClass{margin:0;}.someClass{margin : {{ test}};} @media -ro-pdfreactor { .top-logo {background-image: url({{ test }}) !important;} .header-background { background-color: cmyk(54%,27%,36%,82%) !important; } .headline { color: cmyk(54%,0%,100%,0%) !important; } .body-text-container { color: cmyk(54%,27%,36%,82%) !important; } .cta { color: cmyk(54%,27%,36%,82%) !important; } } .brand-user-logo { background-image: url("https://example.com/image.png"); } .brand-company-logo { background-image: url(""); } .brand-primary-color { color: rgb(19, 44, 69); } .brand-secondary-color { color: rgb(236, 194, 117); } .brand-primary-bg-color { background-color: rgb(19, 44, 69); } .brand-secondary-bg-color { background-color: rgb(236, 194, 117); } .brand-primary-brdr-color { border-color: rgb(19,44,69)gb(19, 44, 69); border-left-color: rgb(19, 44, 69); } .bra
Extraction
.someClass{margin:0;}.someClass{margin : {{ test}};} @media -ro-pdfreactor { .top-logo {background-image: url({{ test }}) !important;} .header-background { background-color: cmyk(54%,27%,36%,82%) !important; } .headline { color: cmyk(54%,0%,100%,0%) !important; } .body-text-container { color: cmyk(54%,27%,36%,82%) !important; } .cta { color: cmyk(54%,27%,36%,82%) !important; } } .brand-user-logo { background-image: url("https://example.com/image.png"); } .brand-company-logo { background-image: url(""); } .brand-primary-color { color: rgb(19, 44, 69); } .brand-secondary-color { color: rgb(236, 194, 117); } .brand-primary-bg-color { background-color: rgb(19, 44, 69); } .brand-secondary-bg-color { background-color: rgb(236, 194, 117); } .brand-primary-brdr-color { border-color: rgb(19,44,69)gb(19, 44, 69); border-left-color: rgb(19, 44, 69); } .bra