Regex Tester
Test a regular expression against sample text and see every match with its position and capture groups.
What is the Regex Tester?
The regex tester runs a JavaScript regular expression against your sample text and lists every match with its position and any capture groups. It reports a clear message if the pattern is invalid. It is useful for building and debugging patterns for validation, search and text extraction.
How to use it
- Paste the text you want to search into the box.
- Type your pattern without the surrounding slashes.
- Add flags such as i for ignore case or m for multiline.
- Read the match list and refine the pattern.
Regex Tester — FAQ
Which regex flavour is used?
JavaScript, as used in browsers and Node.js. Other languages may differ slightly in features such as lookbehind and named groups.
What do the flags mean?
i ignores case, m makes ^ and $ match at each line, s lets the dot match line breaks, and u enables full Unicode. The tool always finds every match.
Why is my pattern marked invalid?
Usually an unclosed bracket or parenthesis, a stray backslash or a quantifier with nothing to repeat. The message explains what the engine rejected.