A regex operator modifies a term—the character, character class, or group immediately before it. Think of the term as a noun and the operator as an adjective: in `/[az]{5}/`, `[az]` matches either `a` or `z`, and `{5}` requires exactly five repetitions. The pattern matches `aaaaa`, `zzzzz`, or `zaaaz`, but not `azamataz`. section 12.2.2 section 12.7
The common repetition operators are `*` for zero or more repetitions, `+` for one or more, and `?` for an optional term. Use parentheses to group multiple terms when the operator should apply to the group; groups capture their matches by default, or can be made non-capturing with `?:`. section 12.7
Repetition operators are greedy by default: `*` and `+` consume as much as they can, then the regex engine may backtrack if later terms fail. When the number of possible backtracking paths grows exponentially, matching can become catastrophic and block JavaScript’s thread. section 12.7
