.*
Regex Tester
Test JavaScript regular expressions live.
//
Contact alice@example.com and bob@test.org for details.
2 matches
| # | Match | Groups | Index |
|---|---|---|---|
| 1 | alice@example.com | alice | example.com | 8 |
| 2 | bob@test.org | bob | test.org | 30 |
Live JavaScript Regex Tester
Type a regular expression in the left box, flags in the right, and paste the text you want to match below. The tool highlights every match and shows captured groups in a table. It uses JavaScript's native regex engine, so patterns that work here will work in Node.js and browser code.
Regex Flags
g— global: find all matches, not just the first.i— case-insensitive.m— multi-line:^and$match line boundaries.s— dot-all:.matches newlines.u— Unicode mode.y— sticky: matches only from lastIndex.
Common Patterns
Email /[\w.+-]+@\w+\.\w+/i
URL /https?:\/\/[^\s]+/i
IPv4 /(?:\d{1,3}\.){3}\d{1,3}/
Phone (US) /\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4}/
Hex color /#(?:[0-9a-f]{3}){1,2}/iRegex Cheat Sheet
\ddigit,\Dnon-digit\wword char,\Wnon-word\swhitespace,\Snon-whitespace.any char (except newline unlesssflag)^start,$end*0+,+1+,?0 or 1{n,m}between n and m times(...)capture group,(?:...)non-capturing
Related Developer Tools
{ }
JSON Formatter
Pretty-print and validate JSON.
🔤
Base64 Encoder / Decoder
Encode and decode Base64 strings.
🔗
URL Encoder / Decoder
Percent-encode and decode URLs.
🔑
JWT Decoder
Decode JSON Web Tokens and inspect payloads.
⇄
JSON to XML Converter
Convert JSON objects into readable XML markup.
↹
XML to JSON Converter
Parse XML and convert it into JSON-like structured data.