Regex Explainer

Explain a regex token by token, inspect flags, and review the basic structural stats.

Regex Explainer

Enter a regex pattern and flags to get a token-by-token explanation.

Example: `^(?:https?):\/\/[\w.-]+$` with `i`

Summary

Valid regex
This pattern uses 2 anchors, contains 1 group, contains 1 character class, uses 2 quantifiers, runs with i flag.
Groups
1
Character classes
1
Quantifiers
2
Alternations
0
Anchors
2

Flag explanations

icase-insensitive

Token explanations

^
Start anchor

Requires the match to start here.

(?:
Non-capturing group

Groups tokens without storing a capture.

h
Literal

Matches the literal character "h".

t
Literal

Matches the literal character "t".

t
Literal

Matches the literal character "t".

p
Literal

Matches the literal character "p".

s
Literal

Matches the literal character "s".

?
Zero or one

Makes the previous token optional.

)
Group end

Closes the current group.

:
Literal

Matches the literal character ":".

\/
Escaped token

Escapes the next character or token.

\/
Escaped token

Escapes the next character or token.

[\w.-]
Character class

Matches one character from the listed set or range.

+
One or more

Repeats the previous token at least once.

$
End anchor

Requires the match to end here.

What does the tool do?

It breaks a regex into smaller pieces and explains what each token means.

What is in scope for v1?

This version is fully deterministic and returns instant explanations without an AI layer.