Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:\b[\w ]*)?(?:[\\.#\\[:].+?|\w+[\\.\\[\]#="'~>\w ]*?|\*)(?=\s*?(?:,|\{))(?!.+;$)
/
gm

Description

Captures CSS Selectors along with combinators

Submitted by Joseph R - 5 months ago