General dev

Regex Tester

Runs locally

Use Regex Tester

What it does

Test a JavaScript regular expression against sample text and see every match with its position and capture groups. Useful for checking a pattern that pulls IPs, domains or email addresses out of headers and logs before you use it elsewhere.

It runs entirely in your browser: nothing you enter is uploaded.

Example

Received header line

Input
Received: from mail.example.net (mail.example.net [203.0.113.25]) by mx.example.com; Tue, 14 Nov 2023 22:13:20 +0000
Output (captured 2026-10-20)
MATCHES
10
GROUPS
1
VALID

#	MATCH	INDEX	GROUPS
1	203	51	1=203
2	0	55	1=0
3	113	57	1=113
4	25	61	1=25
5	14	90	1=14
6	2023	97	1=2023
7	22	102	1=22
8	13	105	1=13
9	20	108	1=20
10	0000	112	1=0000

The default pattern (\d+) lists all 10 digit runs with their index and group 1; replace it with \b(?:\d{1,3}\.){3}\d{1,3}\b to match only 203.0.113.25.

FAQ

Which regex flavour does it use?

Your browser's JavaScript RegExp engine (ECMAScript syntax), including lookahead, lookbehind and named groups. The i, m and s flags can be ticked, and every match is listed with its index and numbered groups.

What are the limits?

Matching is always global, so the g box makes no difference, and the u, y, d and v flags are not offered, so \p{…} escapes do not work. PCRE-only syntax such as possessive quantifiers (a++) is rejected, and a pattern with catastrophic backtracking can freeze the tab because there is no time limit.

Is my text or pattern sent anywhere?

No. Matching runs in your browser and nothing is uploaded.