Regex Visualizer

Visualize regular expressions as railroad diagrams with color-coded nodes, test input matching, and plain-English explanations.

//
Railroad Diagram
literalcharclassgroupalternationquantifieranchorwildcard
[a-zA-Z0-9._%+\-] +@[a-zA-Z0-9.\-] +\.[a-zA-Z] {2,}
Test Input
Contact us at hello@example.com or support@app.io for help.
Match 1: hello@example.com@ index 14
Match 2: support@app.io@ index 35
Plain-English Explanation
Match a character in [a-zA-Z0-9._%+\-] (1 or more times)
Match literal "@"
Match a character in [a-zA-Z0-9.\-] (1 or more times)
Match literal "\."
Match a character in [a-zA-Z] (at least 2 times)
gGlobal – find all matches
iCase insensitive
mMultiline (^ and $ per line)
sDotall (. matches newlines)
uUnicode mode
ySticky – from lastIndex