Pattern & Flags

Hide quick reference (flags & basics)
Flags:
  • g – Global (find all matches)
  • i – Case-insensitive
  • m – Multiline (^ and $ match line start/end)
  • s – Dotall (. matches newline too)
  • u – Unicode (full Unicode support)
Common tokens:
. any char\d digit\w word \s space^ start$ end * 0++ 1+? 0/1 {n} exactly n(…) group(?:…) non-cap | or[abc] set[^abc] negate

Test String

contact@regexpro.com support@example.org invalid-email

Explanation

Enter a pattern to see explanation

Match Results 0 matches

Capture Groups

Substitution

Result:

🧪 Test Cases

History

What is a regular expression?

A regular expression (regex) is a sequence of characters that defines a search pattern, mainly for use in pattern matching with strings.

Which engine should I pick?

Use JavaScript for web (browser/Node), PCRE for PHP, and Python for Python's `re` module. The tester simulates their quirks.

Is my data private?

Absolutely. All processing happens in your browser. We never see your patterns or test strings.

Copied!