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
~
@font-face\s* # Match @font-face and some spaces ( # Start group 1 \{ # Match { (?: # A non-capturing group [^{}]+ # Match anything except {} one or more times | # Or (?1) # Recurse/rerun the expression of group 1 )* # Repeat 0 or more times \} # Match } ) # End group 1
~
gx
Input 1
1
New
.someclass0 { background: url('http://images/someimage.png') no-repeat; } @font-face { font-family: 'FontAwesome'; src: url("fonts/fontawesome-webfont.eot?v=4.0.3"); src: url("fonts/fontawesome-webfont.eot?#iefix&v=4.0.3") format("embedded-opentype"), url("fonts/fontawesome-webfont.woff?v=4.0.3") format("woff"), url("fonts/fontawesome-webfont.ttf?v=4.0.3") format("truetype"), url("fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal; } .someclass1 { background: url('images/someimage.png') no-repeat; } .someclass2 { background: url("images/someimage.png") no-repeat; } .someclass3 { background: url(images/someimage.png) no-repeat; }
Extraction
.someclass0 { background: url('http://images/someimage.png') no-repeat; } @font-face { font-family: 'FontAwesome'; src: url("fonts/fontawesome-webfont.eot?v=4.0.3"); src: url("fonts/fontawesome-webfont.eot?#iefix&v=4.0.3") format("embedded-opentype"), url("fonts/fontawesome-webfont.woff?v=4.0.3") format("woff"), url("fonts/fontawesome-webfont.ttf?v=4.0.3") format("truetype"), url("fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal; } .someclass1 { background: url('images/someimage.png') no-repeat; } .someclass2 { background: url("images/someimage.png") no-repeat; } .someclass3 { background: url(images/someimage.png) no-repeat; }