Results will appear here…
Run a regex to see all matches here.
Capture groups will appear here when your pattern contains them.
What is a Regex Tester?
A regex tester online lets you test and validate regular expressions against sample text in real time. Also called a regular expression tester or regex pattern checker, this free tool shows every match, highlights them in the source text, and displays capture groups and replace output — all without writing a single line of code.
Whether you are doing form validation, data extraction, log parsing, or learning regex syntax for the first time,
this online regex checker updates results instantly as you type. Supports JavaScript regex engine with g, i,
m, s, and u flags.
How to Test a Regular Expression — 3 Steps
Type your regular expression in the Pattern field. Use /pattern/flags notation or just the raw pattern. The tool auto-detects inline flags.
Add the content you want to match against — emails, URLs, phone numbers, log lines, or anything else. Use the Paste button or Ctrl V directly.
Click Test Regex or press Ctrl + Enter. See highlighted matches, a match list, capture groups, and the replace output — all in one view.
Why Use an Online Regex Tester?
Every match is highlighted in the source text so you can spot exactly what your regex captures.
Catch greedy vs lazy mistakes, wrong anchors, or missing flags before they reach production.
Test $&, $1, and named group references before using them in your scripts.
Ideal for beginners learning groups, quantifiers, lookaheads, and anchors step by step.
Toggle g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode).
Everything runs in your browser. Your text and patterns are never sent to any server.
Regex Flags Reference
These are the flags you can use in the tester. Each flag changes how the pattern matches:
g — GlobalFind every match in the string, not just the first one.
i — Case-InsensitiveMatch uppercase and lowercase letters interchangeably.
m — Multiline^ and $ match the start and end of each line, not just the whole string.
s — DotAllMakes . match newline characters too.
u — UnicodeEnable full Unicode matching for emoji and non-ASCII characters.
Ready-Made Regex Examples
Click any example to instantly load a real-world regex pattern into the tester:
More examples: IPv4 address, credit card, hex color codes, HTML tags, postal codes, and slug patterns.
Frequently Asked Questions
Common questions about this online regex tester.
(...) or named groups like (?<name>...), the Capture Groups panel shows each group's value separately from the first match.$& for the full match, $1 / $2 for numbered groups, or $<name> for named groups. The Replace Output panel shows the result.g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode). Toggle them with the checkboxes in the options bar.