Regex Tester

Privacy: all regex matching happens locally in your browser. Nothing is uploaded to any server.

Regex Tester

Test regular expressions online with live match highlighting, built-in pattern explanation, replace preview, and a common patterns library — all local.

Flags: g flag is required for match highlighting
Matches
  

Matches (0)

  • No matches found

Pattern explanation

  • Type a pattern to see its explanation
Regex cheat sheet
Anchors
  • ^ start of line
  • $ end of line
  • \b word boundary
  • \B non-word boundary
  • \A start of input
  • \Z end of input
Character classes
  • . any char (except newline)
  • \d digit (0-9)
  • \w word char (a-z, A-Z, 0-9, _)
  • \s whitespace
  • [abc] one of: a, b, c
  • [^abc] not one of: a, b, c
Quantifiers
  • * zero or more
  • + one or more
  • ? zero or one
  • {n} exactly n
  • {n,} n or more
  • {n,m} n to m
Groups
  • (abc) capture group
  • (?:abc) non-capturing group
  • (?<name>abc) named group
  • a|b alternation
  • \1 backreference
Lookarounds
  • (?=abc) positive lookahead
  • (?!abc) negative lookahead
  • (?<=abc) positive lookbehind
  • (?<!abc) negative lookbehind

Regex Tester

Test regular expressions online with live match highlighting, built-in pattern explanation, replace preview, and a common patterns library — all local.

Tags: regex tester, regular expression, regex online, regex match, regex replace