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.
Toggle the JavaScript g / i / m flags.
Enter a pattern and text
Enter the pattern itself without surrounding slashes.
You can also test logs, notes, and other multi-line text.
Match result
Highlighted matches
Match list
- Match 1Range: 0-19Line 1 / Column 1Matched text
support@example.com - Match 2Range: 36-62Line 3 / Column 1Matched 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
- Enter the regex pattern you want to test.
- Paste the target text into the text area.
- Turn the
g,i, andmflags on or off as needed. - 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.