Skip to main content

Character Classes

.

Any character except newline

\d

Digit (0-9)

\D

Not a digit

\w

Word character (a-z, A-Z, 0-9, _)

\W

Not a word character

\s

Whitespace

\S

Not whitespace

Anchors

^

Start of string

$

End of string

\b

Word boundary

\B

Not a word boundary

Quantifiers

*

Zero or more

+

One or more

?

Zero or one

{n}

Exactly n times

{n,}

n or more times

{n,m}

Between n and m times

Groups

()

Capturing group

(?:)

Non-capturing group

(?=)

Positive lookahead

(?!)

Negative lookahead

Flags

g

Global (find all matches)

i

Case insensitive

m

Multiline

s

Dot matches newline

What is Regex Cheat Sheet?

Quick reference for regular expression patterns, quantifiers, anchors, groups, and flags.

Frequently Asked Questions

Is this tool free to use?

Yes, Regex Cheat Sheet is completely free. No registration required.

Is my data secure?

All processing happens in your browser. Your data never leaves your device.