Regex Tester
100% PrivateDeveloper ToolsTest a regular expression against your text live and see every match with its position.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
- 1Type your pattern, without slashes, in the Pattern field.
- 2Add any flags you need (g, i, m, s, u, y) in the Flags field.
- 3Paste or type the test text.
- 4Read the match list: each match shows its text, index and groups.
Pattern: \d+ with flag g, against the text "Order 123 ships in 45 days". The tester reports two matches: "123" at index 6 and "45" further along. With a pattern like (\w+)@(\w+)\.com on "ada@example.com", the match shows groups "ada" and "example".
- This uses JavaScript's RegExp engine, so syntax follows JavaScript rules, which differ slightly from PCRE, Python or grep flavors.
- A pattern that matches the empty string is advanced safely so the tester never loops forever; results stop at 500 matches.
- Pathological patterns (catastrophic backtracking, like nested quantifiers on long text) can still make your browser tab busy; if that happens, simplify the pattern.
- Without the g flag, only the first match is reported, matching how most code uses a pattern.
No. Type just the pattern body, like \d{3}-\d{4}, and put the flags in their own field.
About this tool
The Regex Tester runs a JavaScript regular expression against your text live and lists every match with its position and capture groups. It is the quickest way to build up a pattern for validation, log parsing or find-and-replace work without guessing.
Related tools
Part of Ovatly's free tools in Developer Tools.