Regex Playground
Developer Tool
Test, debug, and inspect regular expressions instantly with smart match detection and replacement preview.
Exact Matches
Match Details
Replace Preview
Replacement results will appear here
Features
Section titled “Features”- Test regular expressions against any text input
- Highlight matching results instantly
- View match details, indexes, and capture groups
- Replace matched text with custom replacements
- Support for JavaScript regex flags (
g,i,m,s,u) - Copy matched results with one click
- Runs entirely in your browser with no data sent to a server
How to Use
Section titled “How to Use”- Enter a regular expression in the Regex Pattern field.
- Paste or type the text you want to test.
- Select the regex flags you need.
- Click Run Regex to view matching results.
- (Optional) Enter replacement text and click Replace to preview the updated text.
Regex Flags
Section titled “Regex Flags”- g – Find all matches.
- i – Ignore letter casing.
- m – Match each line separately using
^and$. - s – Allow
.to match newlines. - u – Enable Unicode-aware matching.
Most common combinations:
- g – Find every match.
- g i – Find every match, ignoring case.
- g m – Search across multiple lines.
Use Cases
Section titled “Use Cases”- Validate email addresses, phone numbers, URLs, and dates
- Extract IDs, numbers, hashtags, or other text patterns
- Test and debug JavaScript regular expressions
- Preview text replacements before applying them
- Learn how regex patterns and flags affect matching