convertCASEpro

MODE

Regex Tester Tool

Write a pattern, paste a test string and see exactly what matches.

How the Regex Tester Tool works

The pattern runs with your browser's own regular expression engine, so results match what JavaScript code, Node.js and many web tools will do. Matches are highlighted in the test string, and a details list shows the index, the matched text and each numbered or named capture group.

Toggle flags such as global, ignore case, multiline, dotAll and unicode with a click. The replace preview applies a replacement string using $1, $2, $& and $<name> so that you can check a substitution before using it in code.

When it is useful

  • •Building and debugging a validation pattern for forms.
  • •Extracting data from logs, text dumps and scraped content.
  • •Testing a search and replace before running it on files.
  • •Learning regular expressions by seeing groups and matches update live.

Frequently Asked Questions

Which regex flavor does it use?

JavaScript (ECMAScript). Features specific to PCRE, Python or .NET, such as possessive quantifiers or conditionals, may not work.

Why does my pattern match only once?

Without the global flag the engine stops after the first match. Turn on g to find them all.

Can a pattern freeze the page?

Patterns with nested quantifiers on long input can backtrack catastrophically in any engine. If the page stalls, simplify the pattern or shorten the test text.

Related tools

[ Browse all tools ]