Search 100+ free tools… (e.g. json, vpn, password) ⌘K
Link Tools Dereferer Hide Referrer Link URL Shortener Affiliate Cloaker PayPal Links PayPal DonationPayPal Links Privacy Tools Password Generator Cloudflare Resolver My Referrer Torrent Tools Magnet → Torrent Torrent → Magnet Torrent Editor Pirate Bay Proxies Movierulz Proxies ExtraTorrent Proxies Dev Tools Base64 Encoder Hash Generator HTTP Headers Disposable Email Checker Company Blog About Us Contact Anonymize Free
Dev Tool

Regex Tester

Test regular expressions in real time. Matches highlighted instantly, capture groups shown, flags support and a built-in pattern library.

REGULAR EXPRESSION
/ /
TEST STRING
REPLACE WITH (optional)
MATCHES
Enter a pattern to see matches highlighted.

Common Patterns Library

^[\w.-]+@[\w.-]+\.[a-z]{2,}$
Email address
https?:\/\/[^\s/$.?#].[^\s]*
URL
^\+?[1-9]\d{7,14}$
Phone number
^\d{4}-\d{2}-\d{2}$
Date (YYYY-MM-DD)
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
IPv4 address
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
UUID
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
HEX color
(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$]).{8,}
Strong password
^[a-zA-Z0-9_-]{3,20}$
Username (3-20 chars)
^\d{5}(-\d{4})?$
US ZIP code
<[^>]+>
HTML tags
\b(\w+)\s+\1\b
Duplicate words

Frequently Asked Questions

What regex flavour does the tester use?
The tester uses JavaScript's built-in RegExp engine, which follows the ECMAScript standard. This is the same engine used in all modern browsers and Node.js. If you are writing regex for Python, PHP, or other languages, minor syntax differences may apply.
How do I test my regex against multiple lines?
Enable the multiline flag (m) in the flags field to make ^ and $ match the start and end of each line rather than the whole string. Use the global flag (g) to find all matches rather than stopping at the first one.
Can the regex tester explain what my pattern matches?
The tester highlights all matches in your test string in real time as you type the pattern. Matched groups are shown separately so you can verify capturing groups are working correctly. For a plain-English explanation of a regex pattern, tools like regex101.com provide detailed breakdowns.
What regex flavour does this use?
JavaScript RegExp (ECMAScript). This is the same engine used in Node.js, browsers, and most frontend frameworks. It supports lookaheads, lookbehinds, named groups and Unicode properties.
What do the flags mean?
g (global) finds all matches not just the first. m (multiline) makes ^ and $ match start/end of each line not just the string. i (case insensitive) treats A and a as the same. s (dot all) makes . match newlines too.
How do I use capture groups?
Wrap part of your pattern in () to create a capture group. Groups are numbered from left to right starting at 1. In the replace field use $1, $2 etc. to insert group content. Named groups use (?<name>...) syntax.
🛡️
Your IP address and DNS queries are visible to your ISP. Protect your privacy with a trusted VPN — tested and recommended by Anonymiz.
See Recommended VPNs →

Testing regular expressions safely

A regular expression describes a pattern of text, such as an email address, a date, a log line or a URL. It is easy to get one wrong, because a small change can match far more or far less than you intended. This tester highlights every match as you type, shows capture groups and supports flags, so you can check a pattern against real examples before it goes into code.

Flags worth knowing

Common mistakes

Different languages, different rules

Browser-based testers use the JavaScript regex engine. PHP, Python and Java support most of the same syntax but differ in details such as lookbehind and named groups, so test the pattern again in your target language before you ship it.

Related articles

Related Tools

📋
JSON Formatter
Format and validate JSON
📦
Base64 Encoder
Encode and decode Base64
🔏
Hash Generator
Generate MD5, SHA-256 hashes
🔀
Diff Checker
Compare two texts
🔓
JWT Decoder
Decode JWT tokens
📝
Word Counter
Count words and characters
Done!