Regex Checker

Test matches, positions, and flags

Enter the pattern itself without surrounding slashes.

Try

You can also test logs, notes, and other multi-line text.

Match foundMatch count: 2
support@example.com invalid-address hello.user@web-toolbox.dev
  1. Match 1support@example.com0-19 · 1Line 1Column
  2. Match 2hello.user@web-toolbox.dev36-62 · 3Line 1Column

What is Regex Checker?

Enter a JavaScript regex pattern and text to see each match and its position as you type. Use it to draft validation patterns for email or URL input and to build extraction rules.

Changing the pattern, text, or flags updates the result right away. Non-matching input and invalid patterns can be tried as they are.

How to Use

  1. Enter the regex pattern you want to test.
  2. Paste the target text into the text area.
  3. Review the match result and highlighted sections, then adjust the pattern.

The g, i, and m flags can be toggled as needed. You can also start from a sample pattern for email addresses, URLs, or dates.

A short one-line sample is enough for quick checks, but multi-line text is helpful when you want to confirm how line-based conditions behave.

Main Settings

Only the g, i, and m flags can be toggled. Only g is on by default.

Find All Matches (g)

Turn on the g flag to find every match instead of stopping at the first one. It fits extraction patterns and repeated values.

Ignore Letter Case (i)

Use the i flag to ignore uppercase and lowercase differences. It helps when you want to accept variations in user input.

Treat Input as Multi-line Text (m)

Turn on the m flag to make ^ and $ work with each line instead of only the start and end of the full string. Try it with multi-line text to see how line anchors behave.

Reading the Matches

The match count and each match's range, line, and column are listed together. Matched sections are highlighted in the text.

A zero-length match is labeled as empty and shown by its position.

Use Cases

  • Drafting validation patterns for forms and input checks
  • Testing extraction rules for URLs, email addresses, or numeric strings
  • Checking whether a log or document contains values in a specific format

Things to Keep in Mind

  • This tool assumes JavaScript regex syntax, so some features may behave differently from other languages.
  • The input field is meant for the pattern itself rather than a full regex literal in source code. When you move a tested pattern into code, escaping must match the string syntax of the language you use.