Skip to content
KAIROSAI SOLUTIONS

Free developer tool

Regex Tester & Generator

Test, validate and generate regular expressions with live highlighting.

Common email format: name, @, domain and a top-level domain.

//gm

Valid pattern · checking…

Matches highlighted

hello@kairosais.com
first.last+news@mail.co.in
not-an-email@
@missing.com
Regex cheat sheet
.
Any character except a line break
\d \w \s
Digit, word character, whitespace
\D \W \S
Not a digit, word character or whitespace
[abc] [^abc]
Any of a, b, c / anything except them
[a-z]
Any character in the range
^ $
Start / end of text (or line with m)
\b
Word boundary
* + ?
0 or more, 1 or more, 0 or 1
{3} {2,5}
Exactly 3, between 2 and 5
(abc)
Capture group ($1, $2… in Replace)
(?<name>abc)
Named group ($<name> in Replace)
(?:abc)
Group without capturing
a|b
a or b
(?=abc) (?!abc)
Followed by / not followed by

About This Regex Tester & Generator

Write or generate a regular expression and test it against your own text. Syntax errors are shown instantly, matches are highlighted as you type, and the match table lists every capture group. Patterns use JavaScript regex syntax and everything runs in your browser.

How to Use It

  1. 1Pick a ready-made pattern under Generate, or type your own regular expression.
  2. 2Turn flags on or off: g (global), i (ignore case), m (multiline), s (dotAll), u (unicode).
  3. 3Paste your test text. Matches are highlighted and listed with their capture groups.
  4. 4Optionally turn on Replace to preview a find-and-replace using $1 or $<name>.
  5. 5Copy the pattern, or the full /regex/flags literal, into your code.