$1, $2… for capture groups. In JS, $$ inserts a literal $. Named groups: $<name>.. any char (use s for newline too)\d digit · \w word · \s space\b word boundary · ^ start · $ end
* 0+ · + 1+ · ? 0/1{m} exact · {m,n} range · +? lazy
(...) capture · (?:...) non-capture(?<name>...) named capture\1 in pattern; $1 / $<name> in replace
(?=...) lookahead · (?!...) negative(?<=...) lookbehind · (?<!...) negative LB
i ignore case · g global · m multilines dotAll · u unicode · y sticky · d indices
Choose which optional categories you allow. Necessary cookies are always on. Privacy Policy.