Regex Tester
Write a regular expression and see matches highlighted live.
Regex quick reference
. any character · \d digit · \w word character · \s whitespace · ^ start · $ end · * 0 or more · + 1 or more · ? optional · {2,5} range · (…) capture group · (?<name>…) named group · [abc] character set. Flags: g global, i ignore case, m multiline, s dot matches newline, u unicode.
Frequently asked questions
Which regex flavor does this use?
It uses your browser's JavaScript (ECMAScript) regex engine, the same one used in Node.js and front-end code.
What is a simple regex for an email address?
A practical pattern is ^[^\s@]+@[^\s@]+\.[^\s@]+$. Fully RFC-compliant email regexes are very long and rarely needed.