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

Prepare this object with the specified `pattern`, discarding errors&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
prepare(
    xref:bsl/nullptr_t-08.adoc[bsl::nullptr&lowbar;t] errorMessage,
    size&lowbar;t* errorOffset,
    char const* pattern,
    int flags = 0,
    size&lowbar;t jitStackSize = 0);
----

== Description

Prepare this regular&hyphen;expression object with the specified `pattern`, discarding compile&hyphen;error text (pass a null `errorMessage`)&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *errorMessage*
| null&semi; compile&hyphen;error text is discarded
| *errorOffset*
| optionally receives the pattern offset of a compile error
| *pattern*
| null&hyphen;terminated regular&hyphen;expression pattern
| *flags*
| bit&hyphen;wise OR of `k&lowbar;FLAG&lowbar;&ast;` prepare options
| *jitStackSize*
| size of the JIT stack if `k&lowbar;FLAG&lowbar;JIT` is set
|===


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