Tool guide
Check JavaScript regex matches with samples
Enter a pattern and flags to inspect matched text, positions and capture groups, with built-in pattern references.
How to use
- Enter the pattern without wrapping it in /.../g.
- Select flags such as g or i and enter a short sample.
- Check matching text and boundary cases that should not match.
Example and expected result
Pattern: \b[A-Z]{2}-\d{4}\b
Text: Order AB-2048 created
Match: AB-2048Capabilities and limits
- Uses JavaScript regex semantics and does not provide text replacement.
- Complex nested quantifiers may stall the page; start with short text.
Troubleshooting
Check g for multiple matches and distinguish m from s for multiline text. Patterns from other languages may be incompatible.
Data processing and storage
Patterns, flags and test text are stored in localStorage. Use redacted samples, then empty the inputs or clear this site’s browser data.
Read the full data-processing notice