Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-01-27 08:55
Updated·2023-01-27 10:44
Flavor·ECMAScript (JavaScript)

/
[#.][-_]?[_a-zA-Z]+(?:\w|\\.)*|(?<=\s+|^)(?:\w+|\*)|\[[^\s"'=<>`]+?(?<![~|^$*])([~|^$*]?=(?:['"].*['"]|[^\s"'=<>`]+))?\]|:[\w-]+(?:\(.*\))?
/
gm
Open regex in editor

Description

Matches all types of CSS selectors

Submitted by anonymous