Regex Tester & Cheat Sheet

Test regular expressions in real-time and access common patterns.

Flags:
/
/g
No matches found

Cheat Sheet

Regex Tester & Cheat Sheet

Free online Regex Tester and Cheat Sheet. Test your regular expressions against text in real-time. Includes a quick reference guide for common regex patterns.

πŸ“–How to Use

1Enter Pattern

Enter your regular expression pattern.

2Add Flags

Add flags (g, i, m) if needed.

3Input Test Text

Type or paste your test string.

4View Matches

Matches will be highlighted instantly.

πŸ’‘Common Use Cases

Validating email addresses and phone numbers.
Extracting specific data from large text files.
Replacing patterns in text editors or code.

❓Frequently Asked Questions

What is Regex?

Regular Expressions (Regex) are sequences of characters that define a search pattern. They are used for string searching and manipulation.

What does the 'g' flag do?

The 'g' (global) flag indicates that the regex should be tested against all possible matches in a string, not just the first one.

Regex Basics

Meta Characters

  • . : Any single character
  • ^ : Start of string
  • $ : End of string
  • * : 0 or more
  • + : 1 or more
  • ? : 0 or 1

Character Classes

  • \d : Digit [0-9]
  • \w : Word char [a-zA-Z0-9_]
  • \s : Whitespace
  • [abc] : a, b, or c
  • [^abc] : Not a, b, or c
Regex Tester & Cheat Sheet