/g
\d digit 0-9
\w word char
\s whitespace
. any character
^ start of line
$ end of line
* zero or more
+ one or more
? optional
{n,m} n to m times
(?:…) non-capturing
(?<n>…) named group
[…] character set
| OR / alternation
\b word boundary
Flags
$1 $<name> $&
Highlighted matches