Regex Tester
About this tool
Create and test regular expressions with immediate feedback. Set pattern and flags (g, i, m, s, u, y), run against sample text, see highlighted matches, inspect capture groups, and copy match results—all using the same RegExp engine as your browser JavaScript.
How to use
- Live match highlighting in sample text
- Configurable flags: global, ignoreCase, multiline, dotAll, unicode, sticky
- Capture group table with indexed values
- Match count and index list
- Common pattern snippets for quick start
- Enter pattern: Type your regex in the pattern field and select flags.
- Add test string: Paste the text you want to match against.
- Inspect matches: Review highlights, groups, and errors inline.
Examples
- Test a pattern used to find information in log text
- Extract fields from sample API responses
- Test replace patterns used with the Text Cleaner tool
- Learn regex with immediate visual feedback
Limitations
- Uses JavaScript RegExp only—not PCRE or Python syntax
- Catastrophic backtracking on pathological patterns can freeze the tab
- The text entered in the tool is processed directly in your browser and is not sent to a server.
FAQ
- Why does my pattern show a syntax error?
- JavaScript regex has specific escaping rules. Invalid escapes or unclosed groups trigger parse errors shown in the panel.
- What is the dotAll (s) flag?
- It makes . match newline characters, useful for multi-line logs.
- Can I test replace operations?
- This tool focuses on matching and groups; use the Text Cleaner tool when you need to replace matching text.
- Are matches global by default?
- Enable the g flag to find all matches; without it, only the first match is returned.