🔍 Regex Tester
Regex workbench for match testing, capture groups, replace preview, code snippets, railroad diagrams, and structural explanations.
Workbench Mode
| # | Match | Index | Groups |
|---|
Quick Reference ▾
| Pattern | Description |
|---|---|
| \d | Digit [0-9] |
| \w | Word char [a-zA-Z0-9_] |
| \s | Whitespace |
| . | Any char (except newline) |
| ^ | Start of line |
| $ | End of line |
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 |
| {n,m} | Between n and m times |
| (abc) | Capturing group |
| (?:abc) | Non-capturing group |
| a|b | Alternation |
| [abc] | Character class |
| [^abc] | Negated class |
| (?=abc) | Positive lookahead |
| (?!abc) | Negative lookahead |
Regex workbench with the existing tester as the default mode. Test expressions with real-time match highlighting, captured groups, replace preview, quick syntax reference, and JavaScript, Python, Go, Java, or PHP snippet export. Switch to visualize mode to turn a pattern into a railroad diagram, read a structural explanation, load common presets, and export SVG/PNG or copy SVG. Supports direct ?mode=test and ?mode=visualize landings. Input, match results, and diagram rendering stay in the current browser and are not uploaded to LittleOne Tools servers. Regex semantics can differ by language, so generated snippets should be checked in the target runtime.