Web ToolBox

Regex Checker

Check how regex patterns match your text

Try regex patterns

Results are checked safely in your browser. No input is sent to the server.

Samples
Flags

Toggle the JavaScript g / i / m flags.

Enter a pattern and text

Enter the pattern itself without surrounding slashes.

62

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

Match result

Match found
Match count: 2
Match count
2
Active flags
gi
Status
Match found

Highlighted matches

support@example.com invalid-address hello.user@web-toolbox.dev

Match list

  1. Match 1Range: 0-19Line 1 / Column 1
    Matched text
    support@example.com
  2. Match 2Range: 36-62Line 3 / Column 1
    Matched text
    hello.user@web-toolbox.dev

What is Regex Checker?

Regex Checker is a tool for testing JavaScript regex patterns against text and reviewing where they match. It is useful when you want to draft input validation rules, try extraction patterns for URLs or email addresses, or quickly verify how a pattern behaves before using it in code.

Because the result changes as you adjust the pattern, text, and flags, it works well for quick browser-based testing. It also makes it easier to spot both non-matching cases and invalid regex syntax.

How to Use

  1. Enter the regex pattern you want to test.
  2. Paste the target text into the text area.
  3. Turn the g, i, and m flags on or off as needed.
  4. Review the match result and highlighted sections, then adjust the pattern.

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 Flags

Find all matches g

Turn on the g flag when you want to find every match instead of stopping at the first one. This is useful for 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 when you want ^ and $ to work with each line instead of only the start and end of the full string. This is especially useful for multi-line text checks.

How to Read the Result

Matched sections are shown directly in the text so you can see what the pattern actually captured. When there are multiple matches, you can review them in order and compare the result with the original text.

If there is no match, you can confirm that the current pattern does not fit the text. If the pattern itself is invalid, the tool can show an error so you can fix the syntax first.

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
  • Comparing how flags change match behavior for the same text

Input and Output Example

Use a pattern like this:

\b\d{4}-\d{2}-\d{2}\b

With text like this:

2026-03-31
2026/03/31
Release: 2025-12-01
next date is 2026-04-15

This pattern should match 2026-03-31, 2025-12-01, and 2026-04-15. The slash-based 2026/03/31 does not match, which makes it easy to verify how separator differences affect the result.

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. In many cases, that means you do not need the same double escaping used inside string literals.
  • Very complex patterns or long text can take more time to evaluate.