Enter a pattern, optional flags and the text to test.
About this calculator
This regex tester runs a JavaScript regular expression on your text and lists every match with its position and captured groups. It helps build and debug patterns safely in your browser.
Enter the pattern, the flags (g, i, m, s, u) and the test text.
When to use it
- Validating dates, e-mails or codes.
- Search and replace in an editor.
- Learning regular expressions.
- Debugging form validation.
How to read the result
The default pattern \b\d{2}/\d{2}/\d{4}\b finds dates like 07/11/2026.
Flags: g finds all matches, i ignores case, m makes ^ and $ work per line, s lets . match new lines, u enables Unicode.
Mistakes to avoid
- Forgetting the g flag and getting only one match.
- Not escaping special characters like . or ?.
- Expecting other regex flavours (PCRE, Python) to behave the same.
Formula
Flags: g global, i ignore case, m multiline, s dot matches newline, u unicode
Worked example
\b\d{2}/\d{2}/\d{4}\b finds dates like 07/11/2026.
Frequently asked questions
Which regex flavour is used?
JavaScript (ECMAScript), as in browsers and Node.js.
How do I match a literal dot?
Escape it: \.
Why does my pattern match too much?
Quantifiers are greedy; add ? to make them lazy, as in .*?
Which syntax is used?
JavaScript regular expressions.
Why only one match?
Add the g flag.
Is my text sent?
No.
Related calculators
- JSON Formatter and Validator
- Base64 Encoder and Decoder
- UUID Generator (v4)
- JWT Decoder
- Unix Timestamp Converter
- URL Encoder and Decoder
- All calculators in this category
Results are estimates for information only. Check important figures with a professional.
