Regex Tester
Test regular expressions online — enter a pattern and flags, paste your test string, and instantly see all matches highlighted.
Matches
Quick reference
. Any character \d Digit [0-9] \w Word char [a-zA-Z0-9_] \s Whitespace ^ Start of string $ End of string * Zero or more + One or more ? Zero or one {n,m} Between n and m (abc) Capture group a|b a or b [abc] Character class [^abc] Negated class \b Word boundary g global i case-insensitive m multiline s dot-allRegex Tester Online
Enter a regular expression pattern and test string to instantly see all matches highlighted. The match list shows each match with its index position. Everything runs in your browser — no server involved.
How to use this tool
- Type your regex pattern in the pattern field (without the surrounding slashes).
- Add any flags in the flags field —
gfor global (find all matches),ifor case-insensitive,mfor multiline. - Paste or type the text you want to test in the test string area.
- Matches are highlighted and listed instantly.
Common regex patterns
- Email:
\b[\w.+-]+@[\w-]+\.[a-z]{2,}\b - URL:
https?://[^\s]+ - IPv4:
\b\d{1,3}(\.\d{1,3}){3}\b - Digits only:
^\d+$ - Phone (UK):
(\+44|0)[\d\s]{9,10}