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
Capitalized words
\b[A-Z][a-z]+\bCapitalized words
Emails
Email addresses
[\w.+-]+@[\w-]+\.[\w.-]+Email addresses
URLs
HTTP/HTTPS links
https?://[^\s)]+HTTP/HTTPS links
IPs
IPv4 addresses
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}IPv4 addresses
Dates
ISO date format
\d{4}-\d{2}-\d{2}ISO date format
Domains
Domain from email (lookbehind)
(?<=@)[\w.+-]+Domain from email (lookbehind)
HTML tags
Strip HTML tags
<[^>]+>Strip HTML tags
Repeats
Repeated characters
(\w)\1+Repeated characters
How to use this regex tester
- Enter your pattern in the box between the slashes
/. - Set flags by clicking
g(global),i(case-insensitive),m(multiline),s(dot-all), oru(unicode). Clicking toggles each flag. - Type or paste text into the test area. Matches highlight in real time.
- Try Replace mode to test find-and-replace with
$1,$2backreferences. - Click sample patterns above to load and test common regex examples instantly.
Common flags
g— Global: find all matches, not just the first.i— Case-insensitive: ignore letter case.m— Multiline:^and$match line boundaries, not just string boundaries.s— Dot-all:.matches newline characters too.u— Unicode: enable full Unicode matching (use\p{...}for categories like\p{L}for any letter).
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 →