📅 Tax Season 2026 58 days remaining  📁 Collect W-2s, 1099s & receipts first.
Developer Utility

Free Regex Tester & Debugger 2026

Test regular expressions against any string — see matches, capture groups, flags, and replacement results instantly. No signup, no install.

Live Matches Capture Groups i m s x Flags Find & Replace

Regex Tester & Debugger

Enter pattern → paste test string → click Test Regex

Regex Syntax Cheatsheet

The most commonly used regular expression tokens with examples

Token Meaning Example Matches
.Any character except newlinec.tcat, cot, cut
\dAny digit 0–9\d{4}2026, 1999
\wWord char [a-zA-Z0-9_]\w+hello, user_1
\sWhitespace (space, tab, newline)\s+Spaces between words
^Start of string / line^HelloLines starting with Hello
$End of string / line\d+$Numbers at end of line
*Zero or more (greedy)ab*cac, abc, abbc
+One or more (greedy)ab+cabc, abbc (not ac)
?Zero or one (optional)colou?rcolor, colour
(…)Capture group(\d{4})-(\d{2})2026-01, captures year+month
[…]Character class[aeiou]Any single vowel
|Alternation (OR)cat|dogcat or dog

Ready-to-Use Regex Patterns

Copy any pattern directly into the tester above

📧 Email Address
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
🌐 URL / Web Address
https?:\/\/[^\s/$.?#].[^\s]*
📱 US Phone Number
(\+1[-.\s]?)?\(?\d{3}\)?[-.\s]\d{3}[-.\s]\d{4}
🎨 Hex Colour Code
#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})
📅 ISO Date YYYY-MM-DD
\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])
🔐 Strong Password
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*])[A-Za-z\d@$!%*]{8,}
🌍 IPv4 Address
(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)
🏷️ HTML Tag Stripper
<[^>]*>

Regex Flags Explained

How each flag changes your pattern's behaviour

iCase Insensitive

Makes the pattern match both uppercase and lowercase letters. hello matches Hello, HELLO, hElLo.

mMultiline

Makes ^ and $ match the start and end of each line, not just the whole string.

sDot All

Makes . match newline characters too. Without this flag, . does not match .

xVerbose

Allows whitespace and comments inside the pattern. Use # for inline comments in complex patterns.

Frequently Asked Questions

Common questions about regular expressions and this tool

What is a regular expression (regex)?
A regular expression is a sequence of characters that defines a search pattern. It is used to match, find, extract, replace, and validate strings. Regex is supported in Python, JavaScript, Java, PHP, Ruby, Go, and virtually every other language. Syntax varies slightly between Python re, JavaScript RegExp, and PCRE flavours.
What is the difference between greedy and lazy matching?
Greedy quantifiers (*, +, ?) match as much as possible. Lazy quantifiers (*?, +?, ??) match as little as possible. For example given <b>bold</b>, the greedy pattern <.*> matches the entire string, while the lazy <.*?> matches only <b>.
What are capture groups and backreferences?
Capture groups are defined with parentheses and extract specific portions of a match. Group 0 is the full match, group 1 is the first (…), etc. Named groups use (?P<name>…) syntax in Python. Backreferences (, ) reference captured groups within the same pattern or replacement string.
Does this tool use Python or JavaScript regex?
This tool uses Python's built-in re module on the server side. Python regex is largely compatible with PCRE but differs from JavaScript's RegExp — notably named groups use (?P<name>…) syntax. Flags i, m, s, and x are supported.
How do I match a literal dot or special character?
Escape special characters with a backslash: \. matches a literal dot, \( matches a literal parenthesis, \ matches a literal backslash. Special regex characters needing escape: . ^ $ * + ? { } [ ] | ( ) \
What does the i flag do and when should I use it?
The i (case insensitive) flag makes your pattern match regardless of letter case. With i, the pattern hello matches Hello, HELLO, and hElLo. Use it for case-agnostic matching in user input validation, search features, and log parsing.
All Tools
Homework Planner
GPA Calc
Flashcards
Citations
Study Timer
Grade Calc
Unit Conv.
File Compress
File Convert
PDF Merger
Image→PDF
Text Extract
Video DL
PDF Splitter
File Encrypt
BG Remover
FG Remover
Color Changer
Img Resizer
QR Code
Percentage
Loan EMI
Mortgage
Tax Calc
Salary
Currency
BMI
Tip Calc
Compound Int.
Translator
Summarizer
Transcription
AI Chat
Project Maker
Paraphraser
Word Counter
Case Converter
Paraphraser
Summarizer
Text Extractor
Find & Replace
Diff Checker
Text to Speech
Lorem Ipsum
JSON Format
Base64
Regex Tester
Speed Test
My IP
Notes App
Stock Advisor
Risk Simulator
CSV↔JSON
XML↔JSON
Base64
URL Encode
Binary↔Text
MoleMath
ChemScope
Periodic Table
SEO Analyzer
Speed Test
Keywords
Internal Links
Cannibalization
Tech Stack
Islam Home
Prayer Times
Quran Reader
Halal/Haram
Christianity
All Religions
Prayer Times
Athan
Qibla
Tasbih
Halal Scanner
Zakat Calc
Masjid Finder
Ramadan
Quran Reader
Hadith
Flappy Bird
Snake
Chess
2048
Tetris
All Games →
All News
Tech News
AI News
World News
Islamic News
Finance News
Sports
Science
Health
Web Dev
Tax Services
Business
Book Appt
Expenses
All Services