Regular Expression Tester

Check regex patterns in real-time, highlight matches, and view capture groups instantly.

regex testerregular expression onlinejs regex test

Interactive Tool

//
Highlighted result will display here...

Intro

A powerful utility to test JavaScript RegExp patterns against your strings.

How to use

  1. Enter regex pattern
    Type your regular expression pattern in the input field.
  2. Add test string
    Paste the text you want to test against the pattern.
  3. Review matches
    Highlighted matches and capture groups appear instantly in the output.

Examples

Extract Emails
Find all emails in text using regex.
Input
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Output
Matches: test@example.com
Validate email
Test a regex pattern against an email address.
Input
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Output
Matches: user@example.com

FAQ

What flavor of regex does this tool support?

This tool supports JavaScript RegExp syntax, which is the standard used in web browsers and Node.js. Some advanced features like lookbehind may vary by browser version.

Can I test with flags like case-insensitive?

Yes, you can toggle common flags such as global (g), case-insensitive (i), and multiline (m) to see how they affect your matches.

What are capture groups?

Capture groups are portions of your regex enclosed in parentheses. They let you extract specific parts of a match, such as the domain from a URL pattern.

Related tools

Related guides

  • No related guides in the current seed set.