Regex Tester

Test a regular expression against sample text and see every match highlighted.

Processed on your device. Files are not uploaded

How to test a regular expression

  1. Enter the pattern

    Type your regular expression.

  2. Add test text

    Paste the text to search.

  3. See the matches

    Every match is highlighted. Turn on flags such as case-insensitive if needed.

When to use Regex Tester

You are building a pattern for validation or search, and want to see what it matches before it goes into code.

A pattern behaves oddly, and you want each match highlighted in your own sample text.

Tips for a better Regex Tester result

Enter the pattern, paste test text, and turn on flags such as case-insensitive or multiline as needed.

Test with examples that should match and examples that should not.

Regex Tester: limits and what to check

It uses the JavaScript regular expression engine in your browser, so other languages may differ in small ways.

The available flags are case-insensitive, multiline and dot matches newline.

About Regex Tester

Try a regular expression against sample text and see each match highlighted before you use it in code. Flags for case, multiline and dot-matches-newline are available.

FAQs

Which flags can I use?

Case-insensitive (i), multiline (m) and dot matches newline (s).

Which regex flavour is it?

It uses the JavaScript regular expression engine in your browser.

Related tools