Regex Tester

How to use

Enter a regex pattern (without slashes), select flags if needed, then enter your test string and click Test.

FAQ

What is regex?

A regular expression (regex) is a sequence of characters that defines a search pattern. It is used for string matching, validation, and text manipulation.

What are common regex patterns?

Email: [\w.+-]+@[\w-]+\.[\w.]+ URL: https?://[^\s]+ Digits only: ^\d+$ Whitespace: \s+

What is the difference between greedy and lazy matching?

Greedy (.*) matches as much as possible. Lazy (.*?) matches as little as possible. Example: in "abc123def", \w+ greedily matches "abc123def", while \w+? matches "a".