A global regular expression uses the `g` flag to keep finding matches until it reaches the end of the input. Without `g`, a regular expression stops after its first match. section 12.7
Use `matchAll` with a global regular expression to retrieve repeated matches. The `replace` method can transform a string by replacing each match. section 12.7
Set the global flag
The flag can appear in a regex literal, as in `/test/g`, or as the second argument to `new RegExp("test", "g")`. section 12.7

