Match 1 @ 9–24
ada@example.com
Groups: $1=ada$2=example.com
Match 2 @ 28–42
team@uwarp.dev
Groups: $1=team$2=uwarp.dev
JavaScript RegExp engine. Patterns are not wrapped in slashes—flags live in the checkboxes.
Help Us Improve
—
(—)
Regex tester & playground
Regex test online—live match highlights, capture groups, and flags. Local-first regular expression tester. No signup.
What is a regex tester?
What you can do here
Live regex test: See matches update as you edit the pattern, flags, or sample text.
Match highlights: Matched spans are highlighted in the test string for quick scanning.
Capture groups: Inspect numbered and named groups for each match.
Preset patterns: Start from email, URL, date, IPv4, hex color, or named-group examples.
How to use the regular expression tester
Write a pattern
Enter a JavaScript-compatible regular expression (without surrounding slashes).
Set flags and text
Toggle g/i/m/s/u/y and paste the string you want to test against.
Review matches
Read highlights and the match list—including groups—before copying the pattern into code.
Tips for regex testing
- 01
Escape backslashes in strings
In source code you often need \\d; in this tester type \d once as the pattern body.
- 02
Use g for all matches
Without g, only the first match is reported—like String.prototype.match without /g.
- 03
Prefer explicit character classes
Tighten \w+ when you only want digits or a fixed alphabet.
- 04
Test edge cases
Include empty lines, unicode, and near-misses in the sample text before shipping.
Great for
Validation rules
Prototype email, phone, or ID patterns before wiring forms.
Log parsing
Extract fields from log lines with capture groups.
Learn by experiment
Try flags and quantifiers with immediate visual feedback.
Why test regex here
Local-first
Patterns and sample text never leave the browser for this tool.
Free to use
Unlimited regex testing with no signup.
JS-compatible
Same RegExp engine your front-end code will use.
Groups included
See numbered and named captures without writing a throwaway script.
Technical notes
- Engine
- Browser RegExp via new RegExp(pattern, flags)—JavaScript flavor only.
- Match cap
- Lists up to 500 matches per run to keep the UI responsive on pathological patterns.
- Empty matches
- Zero-length matches advance lastIndex to avoid infinite loops with /g.
- Privacy
- All regex testing is client-side—no network upload.
Sources & References
“Regular expressions are patterns used to match character combinations in strings.”
MDN — Regular expressions: Documents the JavaScript regex syntax and flags this tester exercises. developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
“The exec() method executes a search with this regular expression for a match in a specified string.”
MDN — RegExp.prototype.exec(): API used to collect match indices and capture groups in the playground. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec
“A regular expression is an Object describing a pattern of characters.”
ECMAScript — RegExp: Language standard behind the browser engine that powers regex testing here. tc39.es/ecma262/#sec-regexp-regular-expression-objects