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

Related Tools

JSON Formatter Format, validate and minify JSON online. Beautify messy JSON instantly Base64 Encoder & Decoder Encode text/files to Base64 or decode Base64 strings — runs in browser Text Case Converter Convert text to camelCase, snake_case, kebab-case, PascalCase, UPPER C Word Counter Count words, characters, sentences and paragraphs. See estimated readi