Regex Tester

Test regular expressions with real-time match highlighting, capture groups, and a built-in cheat sheet.

/ /
Test String
Matches & Capture Groups
No matches yet — enter a pattern and test string above.
Regex Cheat Sheet
▼ Show

How to use the Regex Tester

Enter your regular expression in the pattern field (without the surrounding slashes — they're just visual). Toggle flags with the buttons on the right. Paste your test string below and matches highlight in real time.


Common regex patterns

^ — start of string  ·  $ — end of string  ·  . — any character  ·  \d — digit  ·  \w — word character  ·  \s — whitespace
[abc] — character class  ·  (group) — capture group  ·  a|b — or  ·  a* — zero or more  ·  a+ — one or more  ·  a? — optional