Peregrine Dev

Regex Tester — Test Regular Expressions Online Free

Write a regex pattern, paste your test string, and see matches highlighted in real time. Instantly. No sign-up required.

Common Patterns

How to regex tester

  1. 1Enter your regular expression pattern in the pattern input field
  2. 2Select the flags you need (global, case-insensitive, multiline, dotAll)
  3. 3Type or paste your test string in the text area below
  4. 4View highlighted matches, match count, and capture group details in real time

About This Tool

A regex tester lets you write and debug regular expressions interactively. Instead of running your code, waiting for output, and guessing what went wrong, you can see exactly which parts of your test string are matched and inspect each capture group as you refine your pattern.

This free regex tester uses JavaScript's native RegExp engine, so the behavior matches exactly what you would get in a browser or Node.js environment. You can toggle flags including global (g), case-insensitive (i), multiline (m), and dotAll (s). Each match is highlighted in the test string, and a detailed list shows every match along with its capture groups and positions. A reference sidebar provides ready-to-use patterns for common tasks like validating emails, URLs, phone numbers, IP addresses, and dates.

All processing happens locally in your browser. Your patterns and test data are never sent to a server, making this regex tester safe for testing against sensitive content. There are no usage limits and no account required.

Frequently Asked Questions

The tool uses JavaScript's built-in RegExp engine. This is the same engine used in all modern browsers and Node.js. Syntax features specific to other flavors (like PCRE lookbehinds in older browsers) may not be available.

g (global) finds all matches instead of stopping at the first. i (case-insensitive) ignores letter case. m (multiline) makes ^ and $ match the start and end of each line. s (dotAll) makes the dot (.) match newline characters too.

Each match is listed with its full match text and any named or numbered capture groups. This makes it easy to verify that your groups are extracting the right portions of the text.

Yes. Click any pattern in the reference sidebar to load it into the pattern input field. You can then modify it to suit your specific needs.

No. All testing happens locally in your browser. Your patterns and test strings are never sent to any server and are not stored or logged.

Related Tools