[#BloombergLP-bdlpcre-RegEx-replace-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlpcre.adoc[bdlpcre]::xref:BloombergLP/bdlpcre/RegEx.adoc[RegEx]::replace
:relfileprefix: ../../../
:mrdocs:

`replace` overloads

== Synopses

Declared in `&lt;bdlpcre&lowbar;regex&period;h&gt;`

Replace matches of `pattern()` in `subject` with `replacement`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlpcre/RegEx/replace-0b.adoc[replace](
    xref:bsl/string.adoc[bsl::string]* result,
    int* errorOffset,
    std::string&lowbar;view const& subject,
    std::string&lowbar;view const& replacement,
    size&lowbar;t options = 0) const;
----

[.small]#xref:BloombergLP/bdlpcre/RegEx/replace-0b.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, writing into a `std&colon;&colon;pmr&colon;&colon;string`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlpcre/RegEx/replace-01.adoc[replace](
    std::pmr::string* result,
    int* errorOffset,
    std::string&lowbar;view const& subject,
    std::string&lowbar;view const& replacement,
    size&lowbar;t options = 0) const;
----

[.small]#xref:BloombergLP/bdlpcre/RegEx/replace-01.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, writing into a `std&colon;&colon;string`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlpcre/RegEx/replace-00.adoc[replace](
    std::string* result,
    int* errorOffset,
    std::string&lowbar;view const& subject,
    std::string&lowbar;view const& replacement,
    size&lowbar;t options = 0) const;
----

[.small]#xref:BloombergLP/bdlpcre/RegEx/replace-00.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
