Regex Tester
Runs a regular expression against text and shows every match and capture group.
Results
What this tool does
Writing a regular expression is a conversation with the pattern: try it, see what it caught, adjust, try again. This shows every match on its own line with the capture groups beside it, counts them, and will do the replacement as well so you can see the result before running it on real data. Flags go in their own box — g for every match rather than the first, i for case-insensitive, m for multiline anchors, s for a dot that also matches newlines.
Formula
runs the expression over the text and returns everything it caught
Variables
| Symbol | Meaning | Unit |
|---|---|---|
pattern | Pattern | — |
flags | Flags (g i m s) | — |
text | Text to search | — |
replace | Replace with | — |
OUT | What it matched | — |
NM | Matches | — |
F1 | First match | — |
GR | Capture groups | — |
RP | After replacing | — |
Worked example
- Pattern([0-9]{4})-([0-9]{2})-([0-9]{2})
- Flags (g i m s)g
- Text to searchEntrega em 2026-09-19 e factura em 2026-10-02.
- Replace with
- What it matched2026-09-19 [2026, 09, 19] 2026-10-02 [2026, 10, 02]
- Matches2
- First match2026-09-19
- Capture groups3
- After replacing
Limitations
- The calculation runs entirely in your browser. The values you type are never sent to a server.
- For work that must comply with a standard or be signed off, check the result against the applicable code and have it reviewed by a qualified engineer.
Frequently asked questions
Which flavour of regular expression is this?
In your browser it is the JavaScript engine, which is what you want if the pattern is destined for a web page. Flavours differ in the corners: named groups are (?<nome>…) in JavaScript and (?P<nome>…) in Python, lookbehind is not available everywhere, and \d matches only ASCII digits in some engines and any digit in others. Character classes, quantifiers, anchors, alternation and capture groups behave the same everywhere, and a pattern built from those will do what you expect wherever you take it.