All tools
SEO Tools
Ads Tools
Link Tools
Social Tools
Text & Content Tools
Utilities
Finance Calculators
Thai Business
Image & Media Tools
Numerology & Fortune
Home & Living
Education
Health

Regex Tester — Test Regular Expressions Online

Test and debug regular expressions right in your browser. Type a pattern, toggle the g, i, m, s, u and y flags, and paste any test string to see every match highlighted in real time. Each match is broken down into its full text, numbered capture groups and named groups, with handy presets for emails, URLs, phone numbers, IPs and dates. Nothing is sent to a server — it is fast, private and free.

/ /

Enter a JavaScript-style pattern, without the surrounding slashes.

Flags

Matches are highlighted and listed below as you type.

Your matches will appear here

Enter a pattern and a test string to see live matches.

How to use

  1. Enter your regular expression in the pattern box, without the surrounding slashes.
  2. Toggle the flags you need: g for all matches, i for case-insensitive, m, s, u or y.
  3. Paste the text you want to search into the test string box.
  4. Watch matches highlight instantly and read the captured groups for each match below.
  5. Click Copy matches to export the results, or pick a preset to start from a common pattern.

Features

  • Live matching as you type, with highlighted results in the test string
  • Full support for the g, i, m, s, u and y flags
  • Numbered and named capture groups listed for every match
  • Preset patterns for email, URL, Thai phone, IPv4 and dates
  • Clear error messages for invalid patterns
  • 100% in-browser — your pattern and text never leave your device

Frequently asked questions

What flavour of regex does this tester use?
It uses the JavaScript RegExp engine built into your browser, so the syntax matches what you would use in JavaScript or TypeScript, including lookahead, lookbehind and named capture groups in modern browsers.
What do the g, i, m, s, u and y flags mean?
g finds all matches instead of just the first, i ignores case, m makes ^ and $ match each line, s lets the dot match newlines, u enables full Unicode mode and y (sticky) matches only from the last index.
How do I capture groups with regex?
Wrap part of your pattern in parentheses to create a numbered capture group, for example (\d{4}). Use (?<year>\d{4}) to create a named group. This tester lists both numbered and named groups for each match.
Is my test data sent anywhere?
No. All matching runs entirely in your browser using JavaScript. Your pattern and test string are never uploaded or stored, which makes this tester safe for sensitive or confidential text.
Why does my pattern show an error?
The error usually means the syntax is invalid — a missing bracket, an unescaped special character, or an unsupported flag combination. The exact browser error message is shown so you can fix the pattern quickly.