CalcuForge
Developer & Tech

Regex Tester & Visualizer

Test a pattern against sample text with live highlighting, a full match list, and capture groups.

//i
Flags
Matches found
2
Test string
Highlighted matches
Contact us at hello@calcuforge.com or support@example.com. Phone: (555) 123-4567. Order #CF-2026-0417 shipped on 2026-08-14.
Match list
#MatchIndexGroups
1hello@calcuforge.com14
2support@example.com.38
Reference

Common pattern building blocks

/pattern/flags
\\d \\w \\sDigit, word character, whitespace (and \\D \\W \\S for their opposites)
+ * ?One-or-more, zero-or-more, zero-or-one of the preceding token
(...)Capture group — extracts that portion of the match
^ $Start and end of string (or line, with the m flag)
Worked example

Extracting email addresses from text

The default pattern loaded in the widget, [\w.+-]+@[\w-]+\.[\w.-]+, matches a typical email address: one or more word characters, dots, plusses, or hyphens before the @, a domain name, and a dot-separated extension. Against the sample test string it finds both email addresses and highlights them directly in the text, while leaving the phone number and order ID untouched.

Pattern pieceMatches
[\w.+-]+The local part before @
[\w-]+The domain name
\.[\w.-]+The dot and extension
FAQ

Common questions

This tool runs your pattern through JavaScript's native RegExp engine — the same one used in browsers and Node.js. Most core syntax (character classes, quantifiers, groups, lookahead) is shared across regex flavors, but some features differ from PCRE (used by PHP, many text editors) or Python's re module, so a pattern that works here should be spot-checked if you're deploying it in a different language.

Related tools