Regex Tester

Free Tool by Aman Views

Test a regular expression

Flags

Result

Ready to test

Enter a pattern and test text, then select Test Regex.

What is a Regex Tester?

A regex tester checks whether a regular expression is valid and shows how it matches sample text. Your pattern and text stay in this browser.

  1. 1Enter a regex pattern
  2. 2Choose compact g, i or m flags
  3. 3Test and review matches
Continue learning

Handwritten PDF Notes for Learning & Interviews

Java • Python • SQL • DSA • System Design • Testing & more

Explore our handwritten notes, interview questions and revision resources.

Explore All PDF Notes →
Keep exploring

Short Regex Cheat Sheet

\ddigit
\wword character
.any character
+one or more
*zero or more
?optional
^start
$end
[]character set
()group

Practical examples

  • \\d+ finds 123 and 456 in “Order 123, invoice 456”.
  • ^[A-Z] with the m flag finds lines that begin with a capital letter.