Regex Tester

Test and debug regular expressions.

Quick Reference

. Any character (except newline)
\w Word character [a-zA-Z0-9_]
\d Digit [0-9]
\s Whitespace
[abc] Any of a, b, or c
[^abc] Not a, b, or c
[a-z] Character between a & z
^ Start of string/line
$ End of string/line
* 0 or more
+ 1 or more
? 0 or 1
{3} Exactly 3
{3,} 3 or more
(a|b) a or b
(...) Group

What is Regex?

Regular Expressions (Regex) are sequences of characters that define a search pattern. They are incredibly powerful for searching, editing, and manipulating text.

Common Regex Patterns

  • Email Validation: ^[^\s@]+@[^\s@]+\.[^\s@]+$
  • Phone Numbers: ^\d{3}-\d{3}-\d{4}$ (US Format)
  • Dates: ^\d{4}-\d{2}-\d{2}$ (YYYY-MM-DD)

Why Use This Tester?

Writing Regex can be difficult and error-prone. This real-time tester allows you to instantly see what your pattern matches as you type, helping you debug and refine your expressions quickly and safely in your browser.