Regex Tester
Test a regular expression with live matches and groups
//gm
Syntax cheat sheet
[abc]Any one character listed[^abc]Any character not listed.Any character except a newline\d \w \sDigit, word character, whitespace; uppercase negates^ $Start / end of text (with m: of each line)\b \BWord boundary / not a boundary* + ?0+, 1+, optional; add ? for lazy{n} {n,m}Exactly n / between n and m(...)Capturing group; $1 in the replacement(?:...)Group without capturing(?<name>...)Named group; $<name> in the replacementa|bEither side\1Same text as group n(?=...) (?!...)Followed by / not followed by(?<=...) (?<!...)Preceded by / not preceded by\.Literal character that is otherwise special