Regex Tester

Test regular expressions against sample text with real-time match highlighting, capture group inspection, and plain-English explanations of your pattern.

100% in your browserNothing is uploaded
No signup requiredUse it instantly
Free foreverNo ads on the tool
//g

About This Tool

Regular expressions are simultaneously one of the most powerful and most frustrating tools in a developer's toolkit. A good regex tester turns a trial-and-error process into a structured, visual workflow.

JavaScript regex flavour

This tool uses JavaScript's built-in regex engine (ECMA-262). If you're writing regex for Node.js, a browser app, or a Next.js API route, the behaviour here is exactly what you'll get in production. Notable features of the JS engine: lookahead/lookbehind assertions, named capture groups (`(?<name>...)`), the 'd' flag for indices, and the 'v' (unicode sets) mode in Chrome 112+/Node 20+.

Flags

- `g` (global): find all matches, not just the first - `i` (case-insensitive): A matches a - `m` (multiline): ^ and $ match line boundaries - `s` (dotAll): . matches newlines - `u` (unicode): enable full Unicode support - `v` (unicode sets): enhanced Unicode mode with set operations

Capture groups

The tool displays each match with its full text, position, and all capture groups (numbered) and named groups. This makes it easy to build extraction regexes without counting parentheses mentally.

Common patterns

- Email: `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` - Nepali phone: `^(98|97|96)[0-9]{8}$` - IPv4: `^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$` - ISO date: `^\d{4}-\d{2}-\d{2}$` - UUID v4: `^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`

Frequently Asked Questions

Related Tools

Last updated: May 1, 2026