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.
bob.smith+qa@sub.domain.co.uk
not-an-email@
charlie@company.io
invalid.address
priyanka.g@softwaretestpilot.com
| # | Match | Groups |
|---|---|---|
| 1 | alice@example.com | user=alicedomain=example.com |
| 2 | bob.smith+qa@sub.domain.co.uk | user=bob.smith+qadomain=sub.domain.co.uk |
| 3 | charlie@company.io | user=charliedomain=company.io |
| 4 | priyanka.g@softwaretestpilot.com | user=priyanka.gdomain=softwaretestpilot.com |
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
- Pick the JWT, UUID v4, or ISO-date prebuilt pattern.
- Paste a response body sample into the test input.
- Switch export to Rest Assured.
- Copy the
matchesPattern()snippet into yourthen().body(...)chain.
- Load the semver, hex-color, or log-timestamp pattern.
- Paste a snapshot of the rendered text.
- Switch export to Playwright.
- Drop the
expect(locator).toHaveText(/.../)snippet into your.spec.ts.
- Paste a chunk of failing CI logs.
- Craft a pattern using the log-timestamp or HTTP-status prebuilt.
- Switch mode to Replace or Split to extract clean rows.
- Export to grep -E or Python for your log pipeline.
- Load AWS-key, credit-card, or XSS heuristic patterns.
- Run against your sample data set to spot leaks.
- Use Replace to mask sensitive fields before sharing fixtures.
- Export the sanitiser to Python or JavaScript for CI.
Regex cheat sheet for testers
Anchors
| ^ | start of input / line |
| $ | end of input / line |
| \b | word boundary |
Character classes
| \d | digit 0-9 |
| \w | word char [A-Za-z0-9_] |
| \s | whitespace |
| [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
| g | global (find all) |
| i | case-insensitive |
| m | ^/$ match per line |
| s | . matches newline |
Pair this with
JSON / JSONPath / JMESPath Tester
Match a regex, then validate the enclosing JSON structure with JSONPath or JMESPath — with Postman + Playwright export.
cURL to Code Converter
Convert any request to a Playwright, Rest Assured, or k6 test — then bolt on regex assertions from this tool.
XPath & CSS Selector Generator
Grab robust Playwright / Selenium locators, then assert their text with a regex you built here.
API Testing Interview Q&A
60+ Q&As on status codes, contract testing, and regex assertions in Postman + Rest Assured.
Playwright Interview Q&A
Regex locators, toHaveText, and hasText filters — the exact APIs this tester exports to.
SoftwareTestPilot Blog
Deeper tutorials on regex for testers: log scraping, PII masking, and pattern-driven contract tests.