SoftwareTestPilot
Free tool · 100% in-browser · no signup

Regex Tester for QA Engineers

Live match highlighting, 25+ prebuilt QA patterns, replace & split modes, named-group support, a plain-English explainer, and one-click export to Java, Python, JavaScript, .NET, Go, Playwright and Rest Assured. Nothing leaves your browser.

25+ prebuilt patternsNamed groupsReplace + SplitPlaywright / Rest Assured exportPattern explainer100% local
/flags
//gm
4 matchesflags: gmpattern length: 68
alice@example.com
bob.smith+qa@sub.domain.co.uk
not-an-email@
charlie@company.io
invalid.address
priyanka.g@softwaretestpilot.com
Capture groups
#MatchGroups
1alice@example.comuser=alicedomain=example.com
2bob.smith+qa@sub.domain.co.ukuser=bob.smith+qadomain=sub.domain.co.uk
3charlie@company.iouser=charliedomain=company.io
4priyanka.g@softwaretestpilot.comuser=priyanka.gdomain=softwaretestpilot.com
^start of input (or line with 'm' flag)(?<user>named capture group 'user'[A-Za-z0-9._%+-]character class — any one of the listed characters/ranges+1 or more of previous)end of group@literal '@'(?<domain>named capture group 'domain'[A-Za-z0-9.-]character class — any one of the listed characters/ranges+1 or more of previous\.literal '.'[A-Za-z]character class — any one of the listed characters/ranges{2,}quantifier — repeat count)end of group$end of input (or line with 'm' flag)
import { test, expect } from '@playwright/test';

test('regex matches expected content', async ({ page }) => {
  await page.goto('/your-page');

  // Locate an element whose text matches the pattern
  const target = page.getByText(/^(?<user>[A-Za-z0-9._%+-]+)@(?<domain>[A-Za-z0-9.-]+\.[A-Za-z]{2,})$/gm);
  await expect(target).toBeVisible();

  // Or assert an existing locator's text matches
  await expect(page.locator('[data-testid="value"]')).toHaveText(/^(?<user>[A-Za-z0-9._%+-]+)@(?<domain>[A-Za-z0-9.-]+\.[A-Za-z]{2,})$/gm);
});

Prebuilt patterns — one click to load

Why this regex tester beats regex101, regexr, and IDE plugins

Multi-language export, not a snippet

Java Pattern/Matcher, Python re.compile, C# RegexOptions, Go regexp, Playwright toHaveText, and Rest Assured matchesPattern — each with correct flag mapping and escaping.

25+ QA-focused prebuilt patterns

Email, JWT, UUID v4, IPv4/IPv6, ISO date, semver, credit card, IBAN, MAC, log timestamp, AWS key, XSS + SQL-injection heuristics, strong password — all tested against realistic samples.

Local-only — safe for PII & tokens

The regex, sample input, and generated code never leave your browser. Paste production log samples, JWTs, or customer data without risk.

Match + Replace + Split modes

Preview a re.sub / String.replaceAll transformation live, or split an input by the pattern — before you commit it to test code.

Plain-English pattern explainer

Every anchor, character class, quantifier, and group is labeled in words. Perfect for code reviews and onboarding new QA engineers.

Named groups + lookaround

Full V8 support: named capture groups, positive/negative lookahead & lookbehind, unicode property escapes, sticky flag. Capture-group table shows every extraction.

How QA engineers use this regex tester

API response validation
  1. Pick the JWT, UUID v4, or ISO-date prebuilt pattern.
  2. Paste a response body sample into the test input.
  3. Switch export to Rest Assured.
  4. Copy the matchesPattern() snippet into your then().body(...) chain.
Playwright UI assertions
  1. Load the semver, hex-color, or log-timestamp pattern.
  2. Paste a snapshot of the rendered text.
  3. Switch export to Playwright.
  4. Drop the expect(locator).toHaveText(/.../) snippet into your .spec.ts.
Log scraping & CI failures
  1. Paste a chunk of failing CI logs.
  2. Craft a pattern using the log-timestamp or HTTP-status prebuilt.
  3. Switch mode to Replace or Split to extract clean rows.
  4. Export to grep -E or Python for your log pipeline.
Test data generation & sanitization
  1. Load AWS-key, credit-card, or XSS heuristic patterns.
  2. Run against your sample data set to spot leaks.
  3. Use Replace to mask sensitive fields before sharing fixtures.
  4. Export the sanitiser to Python or JavaScript for CI.

Regex cheat sheet for testers

Anchors

^start of input / line
$end of input / line
\bword boundary

Character classes

\ddigit 0-9
\wword char [A-Za-z0-9_]
\swhitespace
[A-Z]any uppercase letter

Quantifiers

*0 or more
+1 or more
?0 or 1
{2,5}between 2 and 5

Groups

(abc)capture group
(?:abc)non-capturing
(?<name>abc)named group

Lookaround

(?=abc)positive lookahead
(?!abc)negative lookahead
(?<=abc)positive lookbehind

Flags

gglobal (find all)
icase-insensitive
m^/$ match per line
s. matches newline

Pair this with

Regex tester — frequently asked questions

1.Is this regex tester free and does it work offline?
Yes — 100% free, no signup, no ads, and no upload. The entire regex engine, prebuilt-pattern library, code exporter, and pattern explainer run inside your browser using the native JavaScript RegExp engine. Once the page loads, it keeps working with the network disabled, which makes it safe for testing patterns that touch internal data, PII, tokens, or staging URLs you can't paste into hosted competitors like regex101.com or regexr.com.
2.Which regex flavors and export languages are supported?
The live tester uses the JavaScript / ECMAScript RegExp engine (Chromium V8). The one-click Code Export produces idiomatic snippets for eight targets: Java (Pattern / Matcher), Python (re.compile), JavaScript / TypeScript, C# / .NET (Regex), Go (regexp.MustCompile), Playwright (page.getByText / expect().toHaveText with a RegExp), Rest Assured (body(matchesPattern(...))), and a plain shell grep -E fallback. Flavor-specific gotchas (Java double-escaping, Python raw strings, .NET RegexOptions) are handled automatically.
3.What premium features does this tester have that regex101 and regexr don't?
Seven things: (1) native multi-language code export with correct escaping — not just a snippet placeholder; (2) 25+ QA-focused prebuilt patterns (email, JWT, UUID v4, IPv4/IPv6, ISO-8601 date, semver, credit card, IBAN, SQL injection heuristic, XSS heuristic, strong password) tuned for real test data; (3) inline replace + split modes with live preview; (4) a plain-English pattern explainer that names every token; (5) capture-group table with named-group support; (6) Playwright and Rest Assured export tuned to the assertion API testers actually use; (7) 100% local — safe for internal tokens and PII.
4.How do I validate an email, phone number, or JWT with the prebuilt library?
Click any pattern in the 'Prebuilt patterns' panel — email (RFC-5322 pragmatic), international phone (E.164), UUID v4, JWT (three base64url segments), IPv4, IPv6, ISO-8601 date, semver 2.0, hex color, US ZIP, UK postcode, or strong password (8+ chars, upper, lower, digit, symbol). The pattern loads into the editor, runs against a matching sample, and shows green matches instantly. Then click Export → Java / Python / Playwright to drop it into your test.
5.Can I use the regex directly in a Playwright assertion?
Yes. Pick 'Playwright' in the export panel and the tool emits a ready-to-paste snippet using the exact locator patterns Playwright's docs recommend — page.getByText(/your-pattern/), expect(locator).toHaveText(/pattern/), or page.locator().filter({ hasText: /pattern/ }). Flags (i, m, s, u) are preserved, and the surrounding literal is escaped so you can drop it straight into a .spec.ts file.
6.Does the tester support named capture groups, lookaheads, and unicode?
Yes — everything the V8 RegExp engine supports: named groups (?<name>...), positive/negative lookahead (?=...) / (?!...), lookbehind (?<=...) / (?<!...), unicode property escapes \p{Letter} with the u flag, sticky (y) and dotAll (s) flags. Every named group appears in the capture-group table so you can see what each part of your pattern extracted.
7.How does the pattern explainer work?
The explainer tokenises your pattern into character classes, quantifiers, groups, anchors, and escapes, then labels each part in plain English — e.g. '^' → start of input, '[A-Z]+' → one or more uppercase letters, '(?<year>\d{4})' → named group 'year' capturing four digits. It helps you debug an unfamiliar pattern or explain your test regex in a code review without leaving the tool.
8.Is my regex or input data ever sent to a server?
No. There is no analytics event, no fetch call, and no serverless function tied to the tester. The regex, the sample input, the replacement string, and the exported code are all computed in your browser tab. That's a hard requirement for QA teams testing patterns against production log samples, session tokens, or customer data.