Regex Tester Online — Test Patterns

Regular expression quick reference

A regular expression (regex) is a pattern that describes a set of strings. They are used in search, validation, and text transformation across every programming language. JavaScript regex patterns are written between forward slashes: /pattern/flags.

TokenMeaningExample
.Any character except newline/h.t/ → hat, hit, hot
\dAny digit 0–9/\d+/ → 42, 100
\wWord char (a-z, A-Z, 0-9, _)/\w+/ → hello_world
^Start of string/^Hello/ → Hello world
$End of string/world$/ → Hello world
*0 or more/ab*c/ → ac, abc, abbc
?0 or 1 (optional)/colou?r/ → color, colour
+1 or more/\d+/ → 1, 42, 999

Frequently Asked Questions

Ratings & Reviews

Rate this tool

Sign in to rate and review this tool.

Loading reviews…