i
Hate
Regex
Library
Cheatsheet
Community
Open playground
match an C-like identifier
Regex title
Edit anything to remix
Remix in playground
JavaScript
Expression
/
Regular expression
^
[a-zA-Z_]
[0-9a-zA-Z_]
*
$
^[a-zA-Z_][0-9a-zA-Z_]*$
/
gm
g
i
m
s
u
y
flags
Test bench
Sample text
6 matches
abc123
PascalCase
camelCase
snake_case
_test
_
123abc
abc123 PascalCase camelCase snake_case _test _ 123abc
Structure
Railroad diagram
Interactive
SVG
PNG
Copy
Embed
Live
Strings that match
abc123
PascalCase
camelCase
snake_case
_test
_
Strings that don’t match
123abc
Related patterns
digital object identifier
matches a digital object identifier (doi)