Simple Regex Tester & Pattern Builder
Test JavaScript regex patterns locally, highlight matches and capture groups, preview replacements, and build patterns step-by-step (educational).
Current flags: /pattern/g
Test a Regex Pattern and See Matches Instantly
Enter a pattern, flags, and sample text to begin. Build patterns step-by-step or test your own regex expressions.
Your test text stays local in your browser. Never sent to any server.
See matches highlighted in real-time with capture groups and indices.
Learn regex with an interactive token builder and cheat sheet.
Try an example: Pattern: \b\w+\b with flags: gi to match all words
Understanding Regular Expressions
Learn the fundamentals of regex patterns for text matching and manipulation.
Regular expressions (regex) are patterns used to match character combinations in strings. They're powerful for searching, validating, and transforming text.
Good use cases: Validating email formats, extracting phone numbers, finding patterns in logs, search-and-replace operations.
When NOT to use regex: Parsing HTML/XML (use a proper parser), complex nested structures, when a simple string method works, or when readability is critical and the pattern is complex.
"Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems." — Jamie Zawinski
Frequently Asked Questions
Related Tech & Dev Tools
Explore more developer utilities for your workflow.
HEX/RGB/HSL Color Converter
Convert colors between formats and generate palettes with WCAG contrast checking.
File Transfer Time Calculator
Estimate transfer times based on file size and bandwidth.
API Rate Limit Planner
Plan rate limits, burst capacity, and throttling strategies.
Password Strength Estimator
Analyze password entropy, patterns, and crack-time estimates.