Regex Cheatsheet - Regular Expression Quick Reference

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

Share
Back to Regex Cheatsheet

Capturing Group (abc)

Group

Groups expression into capturing unit, accessible via \1 or $1

Pattern

(abc)

Syntax

Explanation

Capturing groups save matched content, accessible via backreferences \1, \2.

Examples

(\w+)\s+\1

Matches repeated words

Matches: hello hello

(\d{4})-(\d{2})-(\d{2})

Captures year-month-day

Matches: 2024-01-15

Related Tools

More Text Tools