Regex Tester

By Seagit ✨

Test and debug regular expressions with real-time feedback and highlighted matches

Enter pattern without slashes

g: global · i: ignore case · m: multiline · s: dotAll · u: unicode · y: sticky

🔍 Regex Tester — Free Online Tool

Test regular expressions against text online, free. A regex tester lets you write a regular expression and instantly see what it matches in sample text. This tool evaluates your pattern with the browser's native JavaScript regex engine, highlighting every match and capture group live as you type — entirely in your browser.

🚀 Why use this Regex Tester tool?

Matches and capture groups update live against your sample text using the real JavaScript regex engine, so what you test is exactly what your JS/TS code will do. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.

Key Features

🎯Live match highlighting

Every match in your sample text is highlighted as you edit the pattern, so you see results instantly.

🚩Flags & groups

Use flags like g (global), i (ignore case), and m (multiline), and inspect captured groups from your pattern.

🧠Real JS engine

Patterns run on the browser's native JavaScript regex engine, so behaviour matches your front-end and Node.js code exactly.

🔒100% private

Your pattern and test text stay in the browser and are never uploaded.

Popular Use Cases

Validation

  • Build email/phone/ID patterns
  • Test form-field rules
  • Verify input formats

Extraction & parsing

  • Pull values from logs
  • Capture groups from text
  • Scrape structured strings

Learning & debugging

  • Understand why a regex matches
  • Fix a misbehaving pattern
  • Experiment with flags

What It Handles

Tests

  • JavaScript regex syntax
  • Capture groups
  • Multiple matches

Flags

  • g (global)
  • i (ignore case)
  • m (multiline)

Privacy

  • Client-side only
  • No network calls
  • Runs offline

Sources & References

Frequently Asked Questions

Which regex flavor does this use?

It uses the JavaScript (ECMAScript) regular-expression engine built into your browser. That's ideal for testing patterns you'll use in JS/TS or Node, but syntax can differ slightly from PCRE, Python's re, or Java's regex.

What do the flags g, i, and m do?

g (global) finds all matches instead of stopping at the first; i (ignore case) makes the match case-insensitive; m (multiline) makes ^ and $ match at line breaks. You can combine them as needed.

How do capture groups work?

Parentheses ( ) create a capture group that extracts part of a match. Name them with (?<name>...) for readability. The tester shows what each group captured so you can build extraction patterns.

Why does my pattern match too much?

Usually a greedy quantifier. * and + match as much as possible; add ? (e.g. .*?) to make them lazy, or use a more specific character class instead of . to limit the match.

Is my pattern or text uploaded?

No. Everything runs in your browser; your regex and sample text are never sent to a server.

🎓 Pro Tips

  • Tip 1: Build patterns incrementally — start broad, watch the live matches, then tighten with anchors (^ $) and specific character classes.
  • Tip 2: Prefer specific character classes over . — using [0-9] or \d instead of . prevents a pattern from matching more than you intend.
  • Tip 3: Remember this is JavaScript regex; if you'll run the pattern in Python or PCRE, re-check edge cases like lookbehind and named-group syntax.