Regex Playground

Test, debug, and understand regular expressions in real-time

⚡ PRO — Unlock All Features

Pattern Explanation

Cheat Sheet

.Any character
\d \w \sDigit, word, whitespace
\D \W \SNOT digit, word, whitespace
[abc]Any of a, b, or c
[^abc]NOT a, b, or c
[a-z]Range a to z
^ $Start / end of string
\bWord boundary
* + ?0+, 1+, 0 or 1
{n} {n,m}Exactly n, between n-m
(abc)Capture group
(?:abc)Non-capturing group
a|ba OR b
(?=a)Lookahead
(?<=a)Lookbehind

Common Patterns

Email
URL
IPv4
US Phone
US Zip
Hex Color
Date YYYY-MM-DD
IP Strict
Strong Password
HTML Tag
Full Name
Price USD

Free Online Regex Tester

Regex Playground is a free, fast, and privacy-friendly regular expression tester. Type your pattern and test string — matches are highlighted instantly. No data is sent to any server; everything runs in your browser.

What is Regex?

Regular expressions (regex) are patterns used to match character combinations in strings. They're used in every programming language for search, validation, and text manipulation. Our regex tester supports JavaScript regex syntax including lookaheads, lookbehinds, named capture groups, and all standard quantifiers.

Features

How to Use This Regex Tester

1. Enter your regular expression pattern in the top input field. 2. Set flags (g for global, i for case-insensitive, m for multiline, s for dotAll). 3. Type or paste your test string. 4. Matches appear instantly below. Click any common pattern to load it instantly.

Made with ❤️ by MoneyMachine · ☕ Buy me a coffee · ⚡ Go Pro
More free tools: Bill SplitterExcuse GeneratorUnit Converter | See all 50+ tools →