01Why does my pattern match once when I expected many?
Because the g flag is off. Without it, RegExp stops at the first match — which is also why a pattern tested in one tool and run in another can behave differently: the flags, not the pattern, are the difference. The flags in use are shown as part of the expression above.
