About Regex Tester
Write a pattern, paste some text, and see exactly what it matches. Each match is listed with its line and column, followed by its numbered capture groups and any named groups, so you can check a pattern before it goes into your code.
It uses your browser’s own JavaScript regex engine, so the results match what JavaScript and TypeScript code will do. Your text stays on your device.
How to use it
- Type your regular expression in Pattern, without the surrounding slashes.
- Switch on the flags you need: Ignore case (i), Multiline (m), Dot matches newline (s) or Unicode (u). Matching is always global.
- Paste the text to search into the Input box.
- Read the matches on the right; the note shows how many were found, and an invalid pattern shows the error instead.
Frequently asked questions
Which regex flavour does it use?
JavaScript (ECMAScript) regular expressions, as run by your browser. Features such as lookbehind and named groups (?<name>…) work; PCRE-only syntax such as possessive quantifiers does not.
Why do I see empty matches?
Patterns that can match nothing, such as x*, match an empty string at every position. They are listed as "" and the search moves on one character each time, so it never gets stuck.
Is there a limit on matches?
The first 1,000 matches are listed, and the note tells you when there are more.