Cloudesk

RegExp Tester

Test and debug regular expressions with real-time matching

Match Results

No matches found

Useful RegExp Patterns

RegExp Cheat Sheet

Anchors

^Start of string / line
$End of string / line
\bWord boundary
\BNon-word boundary

Character Classes

.Any character (except newline)
\dDigit [0-9]
\DNon-digit
\wWord char [a-zA-Z0-9_]
\WNon-word character
\sWhitespace
\SNon-whitespace

Quantifiers

*0 or more (greedy)
+1 or more (greedy)
?0 or 1 (optional)
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times
*?0 or more (lazy)
+?1 or more (lazy)

Groups

(abc)Capture group
(?:abc)Non-capture group
(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind
\1Back-reference to group 1

Sets & Alternation

[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Character range a to z
a|ba or b (alternation)

Flags

gGlobal – all matches
iCase-insensitive
mMultiline (^ and $ per line)
sDot also matches newline

How to Use RegExp Tester

  1. 1Enter your regular expression pattern in the first input field
  2. 2Type or paste the text you want to test in the textarea below
  3. 3View real-time matches and capture groups in the results section
  4. 4Use the cheat sheet below for common patterns

Related Tools