Regex Cheatsheet - Regular Expression Quick Reference

Quick reference for regular expression patterns. Character classes, quantifiers, anchors, and common patterns.

Share
Back to Regex Cheatsheet

Word Character Shorthand \w

Character Class

Matches any word character: [a-zA-Z0-9_]

Pattern

\w

Syntax

Explanation

\w matches letters, digits, and underscores, commonly used for identifiers.

Examples

\w+

Matches word sequence

Matches: hello_world123

Related Tools

More Text Tools