WRRK Tools
All toolsBlogWRRK CRM
QR Code Tools
PDF Tools
Image Tools
Developer Tools
India Tools
© 2026 WRRK Tools. Free forever.Built by WRRK — the AI workspace for modern teams.
Tools/Regex Tester

Regex Tester

Test JavaScript regular expressions live. Matches highlight as you type, capture groups appear in a table. Browser-only, no signup.

Quick answer

A regex tester lets you write a regular-expression pattern and immediately see what it matches in a sample string. WRRK's tester uses the JavaScript regex engine, highlights every match inline, lists capture groups in a table, and supports all standard flags (g, i, m, s, u). Free, browser-only, no signup.

//
Test string4 matches
Highlighted matches
Reach out to alex@wrrk.ai or sales@example.com. Backup: support@wrrk.space and HR@Example.Org. Not an email: just plain text.
Match details/\b(\w+)@(\w+)\.(\w+)\b/gi
#IndexMatchGroups
113alex@wrrk.ai
$1: alex$2: wrrk$3: ai
229sales@example.com
$1: sales$2: example$3: com
356support@wrrk.space
$1: support$2: wrrk$3: space
479HR@Example.Org
$1: HR$2: Example$3: Org

About this tool

A regular expression (regex) is a pattern for matching text — used for validating email addresses, parsing log lines, extracting data from messy strings, or search-and-replace in code editors. WRRK's regex tester runs your pattern through the native JavaScript RegExp engine, so what you test here is exactly what runs in Node.js, the browser, or any V8 environment.

The tool highlights every match in your test string inline, and the right-side table breaks down each match into its index, full text, and any capture groups (parts of the pattern wrapped in parentheses). Flag buttons toggle g (global), i (ignore case), m (multiline), s (dotall), and u (unicode). The pattern, flags, and test text never leave your browser — useful when testing against real production logs, customer emails, or PII.

How to test a regex (5 steps)

  1. Enter your pattern. Type the regex pattern between the slashes (no need to type the slashes themselves).
  2. Toggle flags. Click flag buttons to enable g, i, m, s, u — or type them directly into the flag input.
  3. Paste test text. Drop the string you want to search into the test-string textarea.
  4. Inspect matches. The right table lists every match with index, full match text, and capture groups ($1, $2, ...).
  5. Refine and copy. Tweak the pattern until matches look right. Copy the working regex into your codebase.

Use cases

  • Validating email, phone, or URL formats before saving them
  • Extracting data from log lines (timestamps, IPs, status codes)
  • Building search-and-replace patterns for VS Code or sed
  • Writing input validation for forms and API payloads
  • Parsing CSV/TSV columns or splitting structured strings
  • Testing regex security (catastrophic backtracking, ReDoS)
  • Learning regex syntax with safe, instant feedback

Frequently asked questions

+−How do I test a regex online?

Paste your pattern in the top input, your test string below. Matches are highlighted live. The match-details table on the right shows index, full match, and every capture group for each hit.

+−What regex flavor does this use?

JavaScript (ECMAScript) regex via the native RegExp constructor. Same syntax you'd use in Node.js or any browser — flags g, i, m, s, u, y are supported.

+−What do the flags g, i, m, s, u mean?

g (global) finds all matches not just the first. i ignores case. m makes ^ and $ match line boundaries. s lets . match newlines. u enables full Unicode mode (recommended for emoji and non-ASCII).

+−How do I read capture groups?

Wrap part of your pattern in parentheses, e.g. (\w+)@(\w+) captures username and domain. Each parenthesized group appears in the 'Groups' column of the match table as $1, $2, etc.

+−Why does my regex match nothing?

Common issues: the 'g' flag is missing (only first match shown elsewhere — we auto-add it), special chars need escaping (use \. for a literal dot), or backslashes need doubling in some contexts. The error banner shows syntax errors.

+−Is the test text uploaded anywhere?

No. The pattern compiles and matches in your browser using the native RegExp engine. Your text never leaves your device — safe for testing patterns against logs, PII, or production data.

+−Can I test PCRE or Python regex here?

This uses JavaScript regex which is close to but not identical to PCRE/Python. Most patterns work the same. Differences: lookbehind support, named groups syntax, and some Unicode property escapes vary by engine.

More free tools

QR Code Generator

URL, WhatsApp, WiFi, UPI, vCard — with logo

WhatsApp Link Generator

wa.me click-to-chat + group invite QR

Image Compressor

Compress to exact KB — for govt forms

Image Resizer

Resize JPG, PNG & WebP by pixels or percentage