Text & Writing Tools

Regex Tester — Live RegExp with g, i, m Flags & Patterns

Test regular expressions free with live highlighting, capture groups, and 16 built-in patterns like email, URL & UUID. g/i/m flags — try your pattern now.

TL;DR: Enter a regex pattern and test string, toggle global, ignore-case, and multiline flags, and see matches highlight live with position and capture-group details — plus 16 one-click common patterns including email, URL, UUID, and IP address.

Reviewed by FYN Tools Editorial · Guides ·

Privacy & processing: Pattern matching uses your browser's native JavaScript RegExp engine on every keystroke. Nothing is sent to a server.

Regex Tester

Test regular expressions free with live highlighting, capture groups, and 16 built-in patterns like email, URL & UUID. g/i/m flags — try your pattern now.

Inputs
Regex pattern (without slashes), test string, and g/i/m flag checkboxes
Outputs
Match count, highlighted preview, and per-match position plus capture groups
Processing
Client-side (browser JavaScript RegExp)
Limits
Only g, i, and m flags exposed — not s, u, or y; auto-tests on change

Quick steps

  1. Enter your regex pattern without surrounding slashes.
  2. Toggle Global (g), Ignore Case (i), and Multiline (m) as needed.
  3. Paste or type your test string in the text area.
  4. Review highlighted matches in the preview panel.
  5. Inspect each match's position and capture groups in the results list.
  6. Click a common pattern button to load a starter regex for email, UUID, URL, etc.
  • Live match highlighting
  • g, i, m flag toggles
  • 16 common pattern buttons
  • Per-match position and groups list
  • Invalid pattern error display

Data input / output

Supported inputs, outputs, formats, limits, and where processing runs for Regex Tester
InputsRegex pattern (without slashes), test string, and g/i/m flag checkboxes
OutputsMatch count, highlighted preview, and per-match position plus capture groups
FormatsJavaScript regular expression syntax
LimitsOnly g, i, and m flags exposed — not s, u, or y; auto-tests on change
ProcessingClient-side (browser JavaScript RegExp)

How to Use the Regex Tester

  1. Enter your regex pattern without surrounding slashes.
  2. Toggle Global (g), Ignore Case (i), and Multiline (m) as needed.
  3. Paste or type your test string in the text area.
  4. Review highlighted matches in the preview panel.
  5. Inspect each match's position and capture groups in the results list.
  6. Click a common pattern button to load a starter regex for email, UUID, URL, etc.

What is a Regex Tester?

Type a pattern and sample text — matches update immediately without a separate Run button. The preview highlights each match, and a results list shows matched text, start/end positions, and numbered capture groups.

Sixteen common patterns load with one click: Email, Phone, URL, IP Address, Date (MM/DD/YYYY), Hex Color, Credit Card, Time (HH:MM), UUID, Username, Password, HTML Tag, IPv6, Postal Code, SSN, and Currency. Toggle Global, Ignore Case, and Multiline flags to mirror typical JavaScript regex usage.

The tester constructs new RegExp(pattern, flags) whenever the pattern, text, or flags change. Invalid patterns show a red outline and the engine error message. Global flag controls whether all matches or only the first are returned.

How it works

Regex Tester reads your input from the panel above, applies live match highlighting, and shows a result you can copy or download. Options stay visible so you can iterate without reloading the page.

Need to convert matched text? Use our Base64 Converter.

Common Use Cases & Examples

  • Form validation prep: Load the Email pattern, test against unusual addresses, then tweak before shipping.
  • Log parsing: Build a pattern with groups to pull timestamps or IPs from raw log text.
  • UUID extraction: Click the UUID common pattern and verify it finds IDs in a configuration dump.

Input / Output Examples

Input

Pattern: \d{3}-\d{4}
Text: Call 555-1234

Output

Match: 555-1234

Frequently Asked Questions

What regex flags are supported?+

We support all standard regex flags: g (global), i (case-insensitive), m (multiline), s (dotall), u (unicode), and y (sticky). These flags modify how the regex pattern matches text.

How do I test regex for email validation?+

Use patterns like ^[\w\.-]+@[\w\.-]+\.[a-zA-Z]{2,}$ for basic email validation. Our tool helps you test and refine email regex patterns with real examples.

Can I save my regex patterns?+

While we don't store patterns on our servers, you can bookmark the page with your pattern in the URL or copy the regex to save locally. Consider using a password manager or note-taking app for important patterns.

What's the difference between capturing and non-capturing groups?+

Capturing groups () store matched text for later use, while non-capturing groups (?:) group elements without storing. Our tool shows both types and their matches clearly.

Key Features

  • Live match highlighting
  • g, i, m flag toggles
  • 16 common pattern buttons
  • Per-match position and groups list
  • Invalid pattern error display

Benefits

Catch regex bugs before they reach production.

Save time with one-click starter patterns.

See exactly which substrings each group captures.

When to Use Regex Tester

  • Debugging a regex before adding it to production validation code
  • Confirming a pattern matches or excludes specific edge-case strings
  • Extracting capture groups from log lines or CSV fields
  • Learning regex interactively with instant visual feedback

Advantages

  • Live auto-test on every change
  • 16 built-in common patterns
  • Match positions and capture group breakdown
  • Same RegExp engine as browser JavaScript

Tips

  • Enable Global when you need every match, not just the first.
  • Start from a common pattern and modify it instead of writing from scratch.
  • Check capture group numbers when your pattern uses parentheses.
  • Enable Multiline when ^ and $ should anchor per line, not the whole string.

Common Mistakes

Leaving Global off and wondering why only one match appears.

Pasting /pattern/gi with slashes instead of just the pattern body.

Expecting Unicode-aware matching without the u flag (not available here).

Using a pattern that needs dotAll (s flag) across newlines — s is not exposed.

Summary

Type a pattern, toggle g/i/m flags, and watch live highlights and capture groups — or start from one of 16 common patterns.

About this page

Regex Tester is maintained by FYN Tools Editorial. See our about and contact pages for ownership, editorial standards, and support.

· Published

Prefer browser-side tools when handling sensitive drafts. Do not paste production secrets, customer PII, or live API keys into online forms.