[#BloombergLP-bdlpcre-RegEx-replaceRaw-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlpcre.adoc[bdlpcre]::xref:BloombergLP/bdlpcre/RegEx.adoc[RegEx]::replaceRaw
:relfileprefix: ../../../
:mrdocs:

Replace matches of `pattern()` in `subject` with `replacement`, without validating UTF&hyphen;8 in `replacement`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
replaceRaw(
    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;
----

== Description

Optionally specify `options` as a bit&hyphen;wise OR of `k&lowbar;REPLACE&lowbar;&ast;` flags&period; Return the number of substitutions on success&semi; on error return a negative value and optionally load `errorOffset`&period; The behavior is undefined unless `true &equals;&equals; isPrepared()`&period;


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