Regular Expressions 101

Community Patterns

Invalid CSS Class

1

Regular Expression
ECMAScript (JavaScript)

/
^[^_A-Za-z]|.([^\p{Letter}0-9\-_]|[\s])
/
u

Description

Checks if the syntax of the passed string would be a valid css class.

Submitted by bye-csavier - 15 days ago (Last modified 15 days ago)