Regular Expressions 101

Community Patterns

1...45678...901

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^\[\s*(((-?([_a-z]|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))([_a-z0-9-]|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))*)|\\*)?|)?(-?([_a-z]|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))([_a-z0-9-]|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))*)\s*((\^=|\$=|\*=|=|~=|\|=)\s*((-?([_a-z]|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))([_a-z0-9-]|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))*)|((\"([^\n\r\f\"]|\\n|\r\n|\r|\f|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))*\")|(\'([^\n\r\f\']|\\n|\r\n|\r|\f|(?![\u0000-\u0239]).*|((\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?)|\\[^\r\n\f0-9a-f]))*\')))\s*)?\]$
/
gm

Description

no description available

Submitted by James Donnelly, Selectors.io - 9 years ago