Replaces all occurrences of the pattern in this with the replacement text.
replacement
is replaced literally, to include backreferences use replace
.
Setting start_position
differs from just passing over a shortened string and setting
NOTBOL in the case of a pattern that begins with any kind of lookbehind
assertion, such as "\b".
this |
a Regex structure |
string_len |
the length of |
start_position |
starting index of the string to match |
replacement |
text to replace each match with |
match_options |
options for the match |
string |
the string to perform matches against |
a newly allocated string containing the replacements |