Regex Tester

Test and debug regular expressions with live matching results

Free
0 total uses
Loading... uses today
We track which tools are used (not your inputs) to improve our service. Your IP address is anonymized for privacy.
/ /

Replace

Regular Expression Quick Reference

Character Classes

  • . - Any character
  • \d - Any digit (0-9)
  • \w - Word character
  • \s - Whitespace
  • \D - Not a digit
  • \W - Not a word char
  • \S - Not whitespace

Quantifiers

  • * - 0 or more
  • + - 1 or more
  • ? - 0 or 1
  • {n} - Exactly n times
  • {n,} - n or more
  • {n,m} - Between n and m

Anchors

  • ^ - Start of string
  • $ - End of string
  • \b - Word boundary
  • \B - Not word boundary

Groups

  • (abc) - Capture group
  • (?:abc) - Non-capturing
  • a|b - OR operator

Character Sets

  • [abc] - Any of a, b, or c
  • [^abc] - Not a, b, or c
  • [a-z] - Range a to z

Lookaround

  • (?=abc) - Positive lookahead
  • (?!abc) - Negative lookahead
  • (?<=abc) - Positive lookbehind
  • (? - Negative lookbehind