Explain any regex in one line

Paste a regex → Understand it instantly

Try these examples:

Regex Input

Explanation

🔍

Ready to explain

Enter a regex pattern above to see the explanation

Test Playground

🧪

No test results

Enter a test string to see matches highlighted

Generated Examples

✅ Should Match

Examples will appear here

❌ Should Not Match

Examples will appear here

Regex Knowledge & Learning

🔤 Character Classes

\d - Any digit (0-9)

\w - Any word character (a-z, A-Z, 0-9, _)

\s - Any whitespace

. - Any character except newline

📏 Quantifiers

* - 0 or more

+ - 1 or more

? - 0 or 1

{n} - Exactly n times

🎯 Anchors

^ - Start of string

$ - End of string

\b - Word boundary

\B - Non-word boundary

🧩 Groups

(...) - Capturing group

(?:...) - Non-capturing group

(?=...) - Positive lookahead

(?!...) - Negative lookahead

📚 Common Patterns

/^[a-zA-Z0-9_]+$/ Username (alphanumeric + underscore)
/^\w+@[a-zA-Z0-9]+\.[a-zA-Z]+$/ Email address
/^(?=.*[A-Z])(?=.*\d).{8,}$/ Strong password
/\b\d{3}-\d{2}-\d{4}\b/ US Social Security Number

🔧 Useful Tricks

Case Insensitive: Use i flag
Global Search: Use g flag
Multiline: Use m flag
Capture Groups: Use parentheses

🌐 URLs & Links

📧 Contact Info

📅 Dates & Times

Frequently Asked Questions

What is a regular expression (regex)?

+

A regular expression is a pattern that describes a set of strings. It's like a search pattern that can match, locate, and manage text. Think of it as a powerful find-and-replace tool that can find complex patterns in text.

Which regex flavors are supported?

+

We support four major regex flavors:

  • JavaScript: Browser-compatible, supports most modern features
  • Python: Full-featured regex support with all built-in features
  • PCRE: Perl-compatible, very powerful with advanced features
  • Java: Java's built-in regex engine with standard features

What do the flags mean?

+

Flags modify how the regex behaves:

  • g (global): Find all matches, not just the first
  • i (ignore case): Case-insensitive matching
  • m (multiline): ^ and $ match line boundaries
  • s (single line): . matches newlines too
  • u (unicode): Enable Unicode features
  • y (sticky): Match from lastIndex only

Is my regex stored or sent anywhere?

+

No, absolutely not! All processing happens locally in your browser. Your regex patterns are never stored, logged, transmitted to servers, or shared with anyone. Your privacy is completely protected.

Why isn't my regex working?

+

Common issues:

  • Unbalanced brackets: Every [ needs a matching ]
  • Flavor support: Some features work differently in different languages
  • Escaping: Special characters might need to be escaped with backslash
  • Anchors: Remember ^ and $ match positions, not characters

Can I use this for learning?

+

Absolutely! This tool is perfect for learning regex. Use the examples, try different patterns, and see how they work in real-time. The detailed explanations help you understand each part of the pattern.

What's the difference between (.+) and (.++)?

+

(.+) uses a quantifier to match one or more of any character (except newline). The + means "one or more" and applies to the preceding character class or group. It's one of the most common patterns for matching text content.