DevsToolkit

Regex Tester

Formatting

Test and debug regular expressions with real-time match highlighting and named group support

All processing happens locally in your browser — your data never leaves your machine.
Loading tool...

Examples

Email Address

Input
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Output
Matches standard email addresses like user@example.com, john.doe+tag@mail.co.uk

URL Pattern

Input
https?://[\w.-]+(?:\.[a-zA-Z]{2,})(?:/[\w./-]*)?
Output
Matches HTTP and HTTPS URLs like https://example.com/path/to/page

Date (YYYY-MM-DD)

Input
(?<year>\d{4})-(?<month>0[1-9]|1[0-2])-(?<day>0[1-9]|[12]\d|3[01])
Output
Matches ISO dates like 2026-05-15 with named groups for year, month, and day

Frequently Asked Questions

How does the Regex Tester work?
Enter a regular expression pattern and a test string. The tool uses JavaScript's RegExp engine to find all matches in real time. Matches are highlighted in the test string preview, and detailed information about each match (including index, length, and named groups) is displayed below.
What regex flags are supported?
The tool supports five standard JavaScript regex flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), s (dotAll — . matches newline characters), and u (unicode — enables full Unicode matching). You can toggle each flag independently.
Is my data safe?
Yes. All regex processing happens entirely in your browser using JavaScript's built-in RegExp engine. No data is ever sent to a server.
Can I use named capture groups?
Yes. Named capture groups using the (?<name>...) syntax are fully supported. When a match contains named groups, they are displayed alongside each match result with their group name and captured value.

Related Tools