Patterns for email, URLs, dates, versions, UUIDs and more. Each is tested against its own examples and states its limitations plainly.
12 tested patterns
Each pattern is checked against its own examples by the test suite, and the examples below are re-checked live in your browser.
/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/What it cannot do
This rejects valid addresses — quoted local parts, addresses with no dot in the domain — and accepts addresses that do not exist. No regex can tell you an address is real. If you need to know, send mail to it; if you need a form check, this is about as strict as is defensible.
a@b.cofirst.last+tag@example.co.ukuser_name@sub.domain.ioplainaddress@no-local.comno-at-sign.netspaces in@example.comtrailing@dot.Regex Pattern Library runs entirely on your device — the examples are checked by your own browser’s regular expression engine.
You’re on the Free plan. Compare plans
Every pattern here is asserted in the test suite against its own matching and rejecting examples, so one cannot quietly stop working. The examples on the page are then re-checked live by your own browser, so what you see is this engine's behaviour rather than a claim about it.
Every entry also carries a limitation, shown as prominently as the pattern. The usual failure of a regex library is not a wrong pattern but a right one used for the wrong job: an email pattern treated as proof an address exists, a URL pattern used as a security control, a date pattern assumed to know how many days February has.
Some of the limitations are the point of the entry. The ISO date pattern matches `2026-02-31`, because no regular expression can do calendar arithmetic. The IPv4 pattern rejects `192.168.01.1` deliberately, because a leading zero is read as octal by some C library functions and one string can then mean two addresses in one system.
The password entry is in the library because people are asked for composition rules, not because they are good. Current NIST guidance is to require length, check against a breached-password list, and drop the character-class requirements — and the entry says so rather than presenting the pattern as best practice.
It checks shape, not existence, and it rejects some valid addresses. No regular expression can tell you an address is real. If you need to know, send mail to it; if you need a form check, this is about as strict as is defensible.
Because a regular expression cannot do calendar arithmetic. It checks that the month is 01–12 and the day 01–31 and nothing more. Construct a date and compare it back if you need a real check — and the entry says this rather than hiding it.
Yes, twice. The test suite asserts each one against its own match and reject lists, so a pattern cannot silently break; and the examples on the page are re-run by your browser when you open an entry.
Most will. The repeated-word pattern needs a backreference, which Go's RE2 and the Rust regex crate do not have at all, and its entry says so. The portability checker gives a full per-engine answer for any pattern.