Regex tester

Find matches, inspect capture groups and test replacements using JavaScript regular expressions.

Processed on your device

Input

Open a local UTF-8 text file5 MiB maximum. The file opens in the text box above.Or drop a file here.

Options

Options
Enter the expression without surrounding / marks. For example, \d+ matches one or more digits.
g = all matches, i = ignore case, m = let ^ and $ match each line. Combine letters, for example gi.

How to use this tool

  1. Find matches, inspect capture groups and test replacements using JavaScript regular expressions.
  2. Adjust the labelled settings, then run the tool. Copy the result or download it as a file.

Things to know

  • Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
  • Uses JavaScript syntax. Patterns are limited to 10,000 characters, matching/replacement to 10,000 matches and output to 10 MiB. Expensive expressions stop after three seconds of execution; Cancel stops them sooner.
  • Patterns: 10,000 characters and 250 capture groups. Potential captured text is preflighted at 25 MiB; replacement text is limited to 256 KiB. Matches/replacements: 10,000; result: 10 MiB. A worker deadline stops expensive expressions after three seconds.

You might also need

More in web development