Regex Tester
Test regular expressions against text and see every match live.
Build and test JavaScript regular expressions live
Enter a pattern, control execution flags and inspect every match, index and capture group against local test data.
Waiting
pattern
—
matches
g
active flags
Expression
JavaScript RegExp syntaxTest data
0 charactersMatch inspector
Live resultsCommon JavaScript regex tokens
- \d
- Any digit from 0 to 9.
- \w
- Any word character: a letter, digit or underscore.
- \s
- Any whitespace, such as a space, tab or newline.
- .
- Any single character except a newline.
- ^ and $
- The start and end of the text (or of each line with the m flag).
- * + ?
- Repeat the previous item zero-or-more, one-or-more, or zero-or-one times.
- {n,m}
- Repeat the previous item between n and m times.
- [...]
- A character set: matches any one character listed inside.
- (...)
- A capture group you can read back or reuse.
About the Regex Tester
Regular expressions are compact patterns for finding and extracting text, used everywhere from validation to search-and-replace.
Type a pattern, choose flags such as global or case-insensitive, and paste your text to see every match and capture group update instantly.
This uses the same regular-expression engine as JavaScript, and everything runs in your browser so your text stays private.
Key features
- Live matches as you type
- All standard flags: g, i, m, s, u, y
- Shows capture groups and match positions
- Clear errors for invalid patterns
- Ready-to-run email extraction example
- Downloadable JSON match report
How to use
- 1Enter your regular expression and pick any flags.
- 2Paste the text to test against.
- 3Review the matches, positions and capture groups in the match inspector.
- 4Export a structured JSON report when you need to keep the results.
Examples
Pattern \b\d+\b against Order 12 items, then 3 moreMatches 12 and 3Enable flags and inspect capture groups when the pattern uses them.
Frequently asked questions
- Which regex flavour does it use?
- It uses the JavaScript (ECMAScript) regular-expression engine, so patterns behave exactly as they would in JavaScript code.
- What do the flags mean?
- g matches globally, i ignores case, m makes ^ and $ match line breaks, s lets the dot match newlines, u enables full Unicode, and y makes matching sticky.
- Is my text uploaded anywhere?
- No. Matching happens entirely in your browser, so your pattern and text stay on your device.
Continue your workflow
Open a related tool to prepare your files or refine the finished result.
- Featured toolDeveloper ToolsJSON Formatter
Format, validate and minify JSON instantly.
Open tool - Featured toolDeveloper ToolsHTML Entity Encoder / Decoder
Escape text to HTML entities or decode entities back to characters.
Open tool - Featured toolDeveloper ToolsURL Encoder / Decoder
Percent-encode or decode URLs and query strings.
Open tool
