Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

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.

How to use Regex Tester online

  1. Type the pattern. Write the regular expression without slashes.
  2. Choose the flags. Tick the options you need, such as ignore case.
  3. Paste test text. Matches are marked in the text and listed with their groups.
  4. 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?
JavaScript, as built into your browser.
What do the flags do?
g finds all matches, i ignores case, m makes ^ and $ work per line, s lets the dot match line breaks and u turns on Unicode mode.
Why was my pattern stopped?
It took more than 2 seconds. It may repeat in a way that backtracks too much. Simplify it.
How do I use groups in a replacement?
Write $1 for the first group, or $<name> for a named group.
Is there a limit on matches?
The first 1000 are listed.
Does the test send my text anywhere?
No. The test runs in your browser, in a worker that belongs to this page.

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.

More tools in Text & Developer Tools →

Search tools