Cheatsheet Pages / Regex Cheatsheet

What does . match in regex? Any character except a newline

You need a wildcard: one character, any character, in a known position.

Patterns use the syntax shared by PCRE / Python / JavaScript; engine differences are flagged in the cheatsheet where they matter. Test any pattern at regex101.com — and pick the matching engine.

a.c
# matches: abc, a1c, a-c … but not "ac" or "a\nc"
Regex Cheatsheet one-page card — patterns that actually work
The full one-page card — Regex Cheatsheet. Get the complete cheatsheet on GitHub