.*

Regex Tester — Free Online Tool

Test regular expressions in real-time

Test regular expressions in real-time. JavaScript regex with match highlights, group capture, and explanation.

/ / g
Common patterns
 
📚
Learn more

Free online regex tester — JavaScript flavor, live highlighting

Toololis Regex Tester lets you test regular expressions against sample text with live match highlighting. Supports all 5 JavaScript regex flags (g, i, m, s, u), named groups, and capture groups. Everything runs in your browser — patterns and test text never leave your device.

Regex flag cheatsheet

  • g (global) — Find all matches, not just the first
  • i (ignoreCase) — Match regardless of upper/lowercase
  • m (multiline)^ and $ match line boundaries, not just string boundaries
  • s (dotAll). matches newlines too
  • u (unicode) — Enables \p{...} unicode classes and surrogate pair handling

How to use this tool

  1. 1

    Type your regex pattern

    Enter a regular expression in the pattern field. No leading/trailing slashes needed — just the pattern itself.

  2. 2

    Toggle flags

    Click flag chips to enable g (global), i (case-insensitive), m (multiline), s (dotall), or u (unicode). Combinations work.

  3. 3

    Paste test text

    Drop the text you want to match against. Matches are highlighted live as you type.

  4. 4

    Review matches

    See the match count, individual match strings, and captured groups. Invalid regex shows a clear error message.

Common regex patterns

  • Email: \b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b
  • URL: https?://[^\s]+
  • ISO date: \b\d{4}-\d{2}-\d{2}\b
  • IPv4: \b(?:\d{1,3}\.){3}\d{1,3}\b
  • Hex color: #[0-9a-fA-F]{3,6}\b
  • Phone E.164: \+?[1-9]\d{1,14}

Regex anchors & groups — quick reference

  • ^ / $ — Start / end of string (or line with m flag)
  • \\b / \\B — Word boundary / non-boundary
  • () — Capture group
  • (?:...) — Non-capture group (faster, no backref)
  • (?<name>...) — Named capture group
  • (?=...) — Positive lookahead
  • (?!...) — Negative lookahead
  • (?<=...) — Positive lookbehind
  • (?<!...) — Negative lookbehind

Frequently Asked Questions

What regex flavor does this support?
JavaScript's native RegExp engine, which is close to PCRE but not identical. Lookbehinds (?<=...), named groups (?<name>), and unicode classes \p{...} all work.
What does the g flag do?
g (global) finds all matches in the text instead of stopping at the first one. Without g, match() returns only the first match. This tool enables g by default for better visibility.
What is the difference between g and m?
g = global (find all matches). m = multiline (make ^ and $ match line starts/ends instead of just string start/end). They are independent — use both when searching line-by-line across a multi-line string.
How do I match across newlines?
Use the s (dotall) flag. By default, . matches any character except newlines. With s, . also matches newlines — useful for parsing HTML or multi-line blocks.
Is my regex data private?
Yes. Testing runs in your browser using native RegExp. No patterns or test text are logged, transmitted, or stored.
Why is my regex slow?
Catastrophic backtracking. Patterns like (a+)+ or (.*)* can explode in time on long inputs. Use atomic groups or possessive quantifiers (not supported in JS — rewrite the pattern) or simpler expressions.
Can I use capture groups?
Yes. Parenthesized groups (foo) capture text. Access them in JavaScript via match[1], match[2], etc. Named groups (?<name>foo) are accessed via match.groups.name.

Key Takeaways

  • Regex Tester is a free, browser-based developer tool — test regular expressions in real-time.
  • No signup, no downloads, no file uploads — your data stays on your device.
  • Works on desktop, tablet, and mobile. Install as a PWA for offline access.

How to Use Regex Tester

  1. Open the tool: Launch Regex Tester on Toololis — no account or download needed.
  2. Enter your data: Paste text, enter values, or select a file directly in your browser.
  3. Get instant results: Everything is processed locally — results appear immediately.
  4. Copy or download: Save your output or share it. Bookmark for quick access next time.

Regex Tester — Quick Facts

Price
Free — no limits, no watermarks, no paywalls
Privacy
100% browser-based — no data is sent to any server
Platform
Any modern browser on desktop, tablet, or mobile
Category
Developer Tools on Toololis
Offline
Works offline after first visit (Progressive Web App)
FeatureDetails
ToolRegex Tester
CategoryDeveloper
Signup RequiredNo
File UploadNone — processed in browser
Mobile SupportFully responsive
CostFree forever

Why Use Regex Tester?

You should try Regex Tester for a quick, private way to test regular expressions in real-time. All processing happens in your browser. Your files and data never leave your device. According to web.dev, client-side processing is the gold standard for privacy.

On the other hand, dedicated APIs or desktop tools suit batch processing better. They also handle server-side automation. For everyday tasks, browser tools offer the best speed, privacy, and convenience.

You might also like

🔒
100% Privacy. This tool runs entirely in your browser. Your data is never uploaded to any server.