Returns the index within the input string used to generate this match
where subexpression number sub begins, or -1 if
the subexpression does not exist.
Defines a constant (0xFFFF was somewhat arbitrarily chosen)
that can be returned by the charAt() function indicating that
the specified index is out of range.
Substitutes the replacement text for the first match found in the input
string, beginning at the specified index position and using the
specified execution flags.
Substitutes the replacement text for each non-overlapping match found
in the input text, starting at the specified index and using the
specified execution flags.