Live regex tester
Test JavaScript regular expressions instantly in your browser. Match highlighting, capture groups, replacement preview, and quick reference for every flag. Nothing leaves your machine.
100% client-side • No registration • Works offline
See also: XPath Tester · CSS Selector Tester
What is a regex?
A regular expression (regex) is a compact pattern language for finding, validating, and extracting text. Every modern language ships a regex engine — but writing patterns blind is painful, and a wrong character class can silently break production.
This tester evaluates your pattern with the same JavaScript regex engine your browser and Node.js use. You'll see every match, every capture group, and any replacement as you type — no compile step, no server roundtrip.
Common uses: parsing scraped HTML, validating user input, building extraction rules for Scrappey scrapers, writing log filters, and replacing structured strings at scale.

Test your regex
Type a pattern and a test string — matches update in real time
Quick reference
The patterns you'll reach for most often
Character classes
- .
- Any character except newline (or any with /s flag)
- \d
- Digit (0-9)
- \D
- Non-digit
- \w
- Word character (A-Z, a-z, 0-9, _)
- \W
- Non-word character
- \s
- Whitespace (space, tab, newline)
- \S
- Non-whitespace
- [abc]
- Any of a, b, or c
- [^abc]
- None of a, b, or c
- [a-z]
- Range a through z
Anchors & boundaries
- ^
- Start of string (or line with /m)
- $
- End of string (or line with /m)
- \b
- Word boundary
- \B
- Non-word boundary
Quantifiers
- *
- 0 or more (greedy)
- +
- 1 or more (greedy)
- ?
- 0 or 1
- {n}
- Exactly n
- {n}
- n or more
- {n,m}
- Between n and m
- *?
- Lazy variant (e.g. .*? — shortest match)
Groups
- (abc)
- Capture group
- (?:abc)
- Non-capturing group
- (?<name>abc)
- Named capture group
- \1
- Backreference to group 1
- (a|b)
- a or b
Lookaround
- (?=abc)
- Positive lookahead
- (?!abc)
- Negative lookahead
- (?<=abc)
- Positive lookbehind
- (?<!abc)
- Negative lookbehind
Replacement syntax
- amp;
- Whole match
- $1, $2
- Capture group 1, 2, ...
- lt;name>
- Named capture group
- $
- A literal $
-
Scrappey: Web Data Access API | Start Building Now - Text before the match
- #39;
- Text after the match
Use your regex on real web data
Scrappey returns clean HTML, JSON, or Markdown from any URL — pipe it straight into the patterns you tested here.
Why use Scrappey's regex tester?
Built for developers who scrape, parse, and validate
Real-Time Matching
Every keystroke recompiles the regex and updates matches, highlights, and replacements instantly.
100% Client-Side
Nothing is sent to a server. Test patterns against proprietary data without leaving your browser.
Full JS Regex Engine
Same engine your code uses in production — lookbehind, named groups, unicode property escapes, all of it.
Replacement Preview
See the result of String.prototype.replace with $1, amp;, and lt;name> substitutions side by side.
Built-In Cheat Sheet
Quick reference for character classes, anchors, quantifiers, groups, and lookaround — no tab switching.
Export to Code
Copy ready-to-paste snippets for JavaScript, Python, and PHP using your current pattern and flags.
Use your regex in code
Drop the tested pattern into your scraper or parser
// Test your regex in any JS runtime (browser, Node.js, Deno)
const re = /\b\w+@\w+\.\w+\b/g;
const text = "Send invoices to [email protected] or [email protected] — cc [email protected].";
// Get every match
const matches = [...text.matchAll(re)].map(m => m[0]);
console.log(matches);
// Replace
const replaced = text.replace(re, "[REPLACEMENT]");
console.log(replaced);Perfect for
Scraping Extraction Rules
Prototype patterns for extracting emails, prices, IDs, or dates from scraped HTML before wiring them into a scraper.
Input Validation
Write and verify validators for emails, URLs, phone numbers, UUIDs, and structured IDs before shipping.
Log Parsing
Build patterns that pull timestamps, levels, IPs, and request paths out of application or access logs.
Bulk Find-and-Replace
Refactor strings, normalize content, or transform CSV/JSON snippets with confidence before running it at scale.
Integrations
n8n
Automate workflows visually. Streamline data collection processes.
n8n Template
Pre-built template for modern websites. Simplifies Scrappey integration.
RapidAPI
Access via API marketplace. Easy integration with comprehensive docs.
Apify
Scalable actor-based automation. Reliable browser rendering.
MCP Server
AI-powered browser automation. Intelligent session management.
Scrappey CLI
Scrape from your terminal. One command, pipeable output, CI-ready.
Claude Code Skill
Portable skill for Claude Code + Codex. Browser-backed data access on demand.
LangChain
LangChain connector — clean web data for any chain or agent.
LlamaIndex
LlamaIndex reader — load modern web pages straight into RAG.
Zapier
Connect with 7,000+ apps. Automate workflows easily.
Make
Visual workflow automation. Connect with 1,000+ apps easily.
Start building with Scrappey
Try it free. No subscription, no credit card, instant setup — your trial is waiting.