Effect(s) if set
The first character in the sequence [first, last) shall be treated as though it is not at the beginning of a line, so the character
The last character in the sequence [first, last) shall be treated as though it is not at the end of a line, so the character
If more than one match is possible then any match is an acceptable result.
The expression shall not match an empty sequence.
The expression shall only match a sub-sequence that begins at first.
When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the ECMAScript replace function in ECMA-262, part 188.8.131.52 String.prototype.replace.
In addition, during search and replace operations all non-overlapping occurrences of the regular expression shall be located and replaced, and sections of the input that did not match the expression shall be copied unchanged to the output string.
During a search and replace operation, sections of the character container sequence being searched that do not match the regular expression shall not be copied to the output string.
When specified during a search and replace operation, only the first occurrence of the regular expression shall be replaced.