Home › Dev Tools › Regex Tester

Free Regex Tester Online

Test and debug regular expressions in real-time. See all matches highlighted, capture groups listed, and match count shown instantly.

✅ Free⚡ Real-time📋 Capture Groups🔍 Highlight Matches

Regex Tester

/ /

Match Details

Common Regex Patterns

Frequently Asked Questions

What are regex flags?
Flags modify how the regex engine searches: g (global) finds all matches instead of stopping at first; i (case insensitive) matches regardless of letter case; m (multiline) makes ^ and $ match line start/end instead of string start/end; s (dotAll) makes . match newlines too.
How do I capture groups in regex?
Use parentheses to create capture groups: (\d{4}) captures a 4-digit sequence. In the match details below, you'll see Group 1, Group 2, etc. for each captured group in each match.
What does \b mean in regex?
\b is a word boundary anchor. It matches the position between a word character (\w) and a non-word character. \b\w+\b matches complete words. Without \b, patterns can match partial words.
Is my test data sent to a server?
No, pattern matching runs entirely in your browser using JavaScript's built-in regex engine. Your test string and pattern never leave your device.
Does this tool use the same regex engine as JavaScript?
Yes, matches are tested using the browser's native JavaScript RegExp engine, so results will match exactly what you'd get running the same pattern in JavaScript code.
Why isn't my pattern matching anything?
Common causes include a missing global flag (g) when expecting multiple matches, special characters that need escaping (like . or *), or case sensitivity — try adding the "i" flag if case shouldn't matter.

About the Regex Tester Tool

The Logrith Regex Tester lets you build, test, and debug regular expressions against sample text in real time, showing every match, capture group, and flag effect instantly as you type. Regular expressions are a powerful but notoriously tricky syntax to get right on the first try, and this tool removes the guesswork by showing exactly what a pattern matches before you use it in actual code.

A regular expression (regex) is a sequence of characters that defines a search pattern, used for finding, validating, or extracting text that matches specific rules — email addresses, phone numbers, dates, or any custom text format. Writing regex correctly on the first attempt is difficult even for experienced developers, since small syntax differences can completely change what a pattern matches. Testing interactively, rather than running code repeatedly, is by far the fastest way to get a pattern right.

Understanding Regex Flags

Common Regex Patterns and What They Do

Understanding Capture Groups

Parentheses in a regex pattern create a capture group, which extracts a specific portion of each match rather than just confirming that a match occurred. For example, the pattern (\d{4})-(\d{2})-(\d{2}) matching a date like "2024-03-15" would capture "2024" as Group 1, "03" as Group 2, and "15" as Group 3 — letting you pull out the year, month, and day separately rather than just the full matched string. This tool displays every capture group for every match, making it easy to confirm your groups are extracting exactly the parts of the text you intend to use.

Common Use Cases for Regex

Step-by-Step: How to Test a Regex Pattern

1. Enter your patternType your regular expression into the pattern field, without the surrounding slashes.
2. Select flagsToggle global, case-insensitive, multiline, or dotAll flags depending on your needs.
3. Paste test textEnter or paste the sample text you want to test the pattern against.
4. Review matchesSee every match highlighted in the text, along with any capture groups extracted.

Privacy

All pattern testing happens locally in your browser using JavaScript's built-in regular expression engine — your test text and pattern are never sent to a server or logged anywhere. This makes the tool safe to use even when testing patterns against sensitive sample data like real user information or internal log excerpts.

Tips for Debugging a Pattern That Isn't Working

When a regex doesn't match what you expect, work through it step by step rather than guessing at the whole pattern at once. Start by simplifying the pattern down to its smallest matching piece and confirm that works, then add complexity back one piece at a time, checking after each addition. Pay close attention to characters that have special meaning in regex — a period (.) matches any character unless escaped as \., and parentheses, brackets, and braces all carry structural meaning rather than being literal characters. Forgetting the global flag is one of the most common reasons a pattern only seems to match once when multiple matches were expected, so if you're only seeing one result where you expected several, that's usually the first thing to check.

Popular Searches

regex tester online regular expression tester test regex pattern free javascript regex tester regex match checker regex capture groups tool online regex debugger regex validator free