Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
ECMAScript (JavaScript)

/
@media([^{]+)\{([\s\S]+?})\s*}
/
g

Description

Separates media query into rule and content

Submitted by Stephan --> CTS_AE - 10 years ago