If the regular expression matches the at least part of the source string, the variable is assigned the value of the first capture group and the subsequent capture groups are ignored. The variable is not assigned if there is no capture group in the regular expression.