Free digital tool

Regex Tester

Test and debug JavaScript regular expressions in real time. See matches highlighted in your text, try replace mode, and pick from common sample patterns — all locally in your browser.

Test match
Replace
gimsu
🔒 Privacy

All regex testing happens locally in your browser. Your text and patterns are never sent to any server.

Sample patterns to try

Words
\b[A-Z][a-z]+\b
Capitalized words
Emails
[\w.+-]+@[\w-]+\.[\w.-]+
Email addresses
URLs
https?://[^\s)]+
HTTP/HTTPS links
IPs
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
IPv4 addresses
Dates
\d{4}-\d{2}-\d{2}
ISO date format
Domains
(?<=@)[\w.+-]+
Domain from email (lookbehind)
HTML tags
<[^>]+>
Strip HTML tags
Repeats
(\w)\1+
Repeated characters

How to use this regex tester

  1. Enter your pattern in the box between the slashes /.
  2. Set flags by clicking g (global), i (case-insensitive), m (multiline), s (dot-all), or u (unicode). Clicking toggles each flag.
  3. Type or paste text into the test area. Matches highlight in real time.
  4. Try Replace mode to test find-and-replace with $1, $2 backreferences.
  5. Click sample patterns above to load and test common regex examples instantly.

Common flags

What is a regular expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. JavaScript supports PCRE-like syntax with features like lookaheads, lookbehinds, named groups, and Unicode property escapes. This tool runs the native JavaScript RegExp engine — the same one used in modern browsers and Node.js.

Related Digital tools

Showing all 28 related digital tools. Browse all tools →

Guides & resources

Browse all tools →