Same as the preceding overload, writing into a std::string.
Declared in <bdlpcre_regex.h>
int
replace(
std::string* result,
int* errorOffset,
std::string_view const& subject,
std::string_view const& replacement,
size_t options = 0) const;
number of substitutions, or a negative value on error
| Name | Description |
|---|---|
| result | location for the replacement text |
| errorOffset | optional location for a syntax-error offset |
| subject | input subject string |
| replacement | replacement text |
| options | bit-wise OR of k_REPLACE_* flags |