Text & Regex

Regex Explainer

Paste a regular expression to see what every part of it does and what each flag changes, with an optional sample text to watch it match. Your pattern never leaves this page.

Runs in your browser v1.0.0

Regular expression

live
Flags
Examples

Write the pattern without the surrounding slashes; use the flag buttons for g, i, m and the rest.

Plain-language summary

Component breakdown

0 parts

Test sample text

no matches

Sample text is only used here in your browser to show matches; it is never uploaded.

How it works

The pattern is tokenised into its parts — literals, character classes, groups, anchors, quantifiers and escapes — and each part is described in plain language. The sample text is matched with the browser’s own RegExp engine, so the result is exactly what your code will see. Everything runs locally; nothing is sent to a server.