Regex Tester

Runs in browser

Test 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

  1. 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.

  2. Enter test text

    Paste or type the string you want to test against. The tool will list all matches.

  3. 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 patternsTest email, phone number, or URL validation regex before embedding them in application code.
  • Extracting data from stringsBuild and test capture groups to extract specific values from log lines, API responses, or file paths.
  • Debugging regex failuresPaste a failing regex and test string to identify why matches are not working as expected.
  • Learning regex syntaxExperiment with quantifiers, character classes, and anchors interactively with instant match feedback.

Examples

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.

You might find these useful too.

More regex tools