Matches a string against a regular expression and replaces the first match with the string generated from the substitution parameter.
@param str The string to match against this regular expression.
@param subspec The substitution parameter, described in
REGULAR EXPRESSION SUBSTITUTION.
@return The string formed by replacing the first match in
str
with the string generated from
subspec
. If no matches were found, then the return value is
null
.