Regex Cheatsheet - Regular Expression Quick Reference

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

Share
Back to Regex Cheatsheet

Dot - Any Character

Character Class

Matches any single character except newline (\n)

Pattern

.

Syntax

Explanation

By default, . matches any character except newline. Use the s flag (dotAll) to include newlines.

Examples

a.c

Matches "abc", "aac", "a3c"

Matches: abc, aac, a3c

h.t

Matches "hat", "hot", "hit"

Matches: hat, hot, hit

Related Tools

More Text Tools