Regex Tester
Regex Tester runs a regular expression on your text and shows the matches, the groups and a replacement preview. It runs in your browser, so your text stays private.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use Regex Tester online
- Type the pattern. Write the regular expression without slashes.
- Choose the flags. Tick the options you need, such as ignore case.
- Paste test text. Matches are marked in the text and listed with their groups.
- Try a replacement. Type a replacement, using $1 for groups, to preview the result.
Why use this free Regex Tester
- Highlighted matches
- Numbered and named groups
- Flags as checkboxes
- Replacement preview
- Slow patterns stopped after two seconds
- Nothing sent, nothing stored
Test before you ship
Regular expressions are powerful and easy to get wrong. Testing a pattern on sample text shows at once what it matches and what it misses. This tool marks every match in your text and lists the matched text, its position and each group.
JavaScript flavour
The tester uses the regular expression engine of your browser, which is the JavaScript one. Other languages differ in details. The flags g, i, m, s and u are checkboxes: find all matches, ignore case, let ^ and $ work on each line, let the dot match line breaks, and Unicode mode.
Groups and replacements
Parentheses make groups, which are listed as group 1, group 2 and so on. A group written as (?...) is listed under its name. Try the pattern (\d+)-(?[a-z]+) on the text a 12-ab, 7-xyz. It finds 2 matches. Replacing with $:$1 gives a ab:12, xyz:7.
Safe against runaway patterns
Some patterns take a very long time on some texts, because the engine tries too many ways to match. To protect your browser tab, the test runs in a worker that is stopped after 2 seconds, and you get a message instead of a frozen page. The tool lists at most 1000 matches and accepts texts of up to 200000 characters.
Regex Tester: frequently asked questions
Which regex flavour is this?
What do the flags do?
Why was my pattern stopped?
How do I use groups in a replacement?
Is there a limit on matches?
Does the test send my text anywhere?
Related searches for Regex Tester
- Regex Tester online
- free Regex Tester
- Regex Tester online free
- Regex Tester for mobile
- Regex Tester without sign up
- Regex Tester – Text & Developer Tools
Regex Tester is a free online tool on MAITBOX, in the Text & Developer Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.