Regex Tester
Test Regular Expressions Online
About Regex Tester
The Online Regex Tester is a free browser-based tool for testing and debugging regular expressions (RegEx / RegExp) against any text string. Enter your pattern, set optional flags (global, case-insensitive, multiline), paste your test string, and instantly see all matches highlighted with their positions and capture groups.
Regular expressions are sequences of characters that define a search pattern. They are used in programming languages, text editors, and command-line tools for string searching, validation, extraction, and replacement. Mastering regex can dramatically speed up text processing tasks.
Supported flags:
Regular expressions are sequences of characters that define a search pattern. They are used in programming languages, text editors, and command-line tools for string searching, validation, extraction, and replacement. Mastering regex can dramatically speed up text processing tasks.
Supported flags:
g (global — find all matches), i (case-insensitive), m (multiline), s (dotAll), u (unicode). Our tester uses JavaScript’s native RegExp engine, making results identical to what you would see in Node.js or any browser environment. starKey Features
search
All Matches & Groups
See every match with its index position and all captured groups clearly listed.
tune
Flag Support
Supports g, i, m, s, u flags for global, case-insensitive, and multiline matching.
bolt
Instant Results
Results update immediately as you test — no page reload needed.
cloud_off
Browser-Based
Uses JavaScript native RegExp — matches what you get in any JS environment.
help_outlineHow to Use
1
Enter Pattern
Type your regular expression in the Pattern field (without surrounding slashes).
2
Set Flags
Add optional flags (g, i, m, etc.) in the Flags field to control matching behavior.
3
Paste Text
Enter or paste the text you want to test against your pattern in the input area.
4
View Results
Click Test to see all matches, their positions, and any capture groups.
lightbulbUse Cases
verified
Input Validation
Validate email addresses, phone numbers, URLs, ZIP codes, and custom formats.
find_in_page
Text Extraction
Extract dates, prices, product codes, or any structured data from text.
code
Code Parsing
Parse log files, config files, or source code to find and extract patterns.
swap_horiz
Search & Replace
Debug regex patterns before using them in find-and-replace operations.