Regex Tester
Runs in browserTest regex patterns and view matches, groups, and flags instantly.
Test regular expressions instantly in your browser. See matches, groups, and flags in real time. Free regex checker — no sign-up required.
Regex Tester tool
🔒 Runs in your browser · No uploads · Your data never leaves your device
How to use
Enter pattern and flags
Type your regular expression in the pattern field. Add flags (e.g. g for global, i for case-insensitive) in the flags field.
Enter test text
Paste or type the string you want to test against. The tool will list all matches.
Review matches
Each match shows the matched text, index, and any capture groups. Invalid regex syntax is reported as an error.
Common use cases
- Validating input patterns — Test email, phone number, or URL validation regex before embedding them in application code.
- Extracting data from strings — Build and test capture groups to extract specific values from log lines, API responses, or file paths.
- Debugging regex failures — Paste a failing regex and test string to identify why matches are not working as expected.
- Learning regex syntax — Experiment with quantifiers, character classes, and anchors interactively with instant match feedback.
Examples
Email-like pattern
Find substrings that look like email addresses.
InputContact us at [email protected] or [email protected]OutputMatches: [email protected], [email protected]
Frequently asked questions
- Which regex flavor is used?
- The tool uses JavaScript's native RegExp, so it follows ECMAScript regex rules. Lookahead, capture groups, and standard character classes are supported.
- Why does my pattern show an error?
- Invalid syntax (e.g. unescaped brackets, invalid quantifiers) causes the engine to throw. Check your backslashes and special characters and try again.
Key concepts
- Regular expression
- A pattern that describes a set of strings, used to search, match, and extract text.
- Capture group
- A portion of a regex enclosed in parentheses () that captures matched text for extraction or backreferencing.
- Quantifier
- A symbol that specifies how many times a preceding element must match — e.g. * (zero or more), + (one or more), ? (zero or one).
- Flag
- A modifier that changes regex matching behavior — e.g. i for case-insensitive, g for global (find all matches), m for multiline.
Related tools
You might find these useful too.
- JSON Formatter
Format and validate JSON instantly.
Open - Base64 Encode / Decode
Encode and decode Base64 text privately in the browser.
Open - Random String Generator
Generate secure random strings with configurable length and charset.
Open - Text Diff Checker
Compare two texts and view line-by-line differences instantly.
Open