[#BloombergLP-bdlpcre-RegEx-prepare-08] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlpcre.adoc[bdlpcre]::xref:BloombergLP/bdlpcre/RegEx.adoc[RegEx]::prepare :relfileprefix: ../../../ :mrdocs: `prepare` overloads == Synopses Declared in `<bdlpcre_regex.h>` Prepare this object with the specified `pattern`, discarding errors. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bdlpcre/RegEx/prepare-0e.adoc[prepare]( xref:bsl/nullptr_t-08.adoc[bsl::nullptr_t] errorMessage, size_t* errorOffset, char const* pattern, int flags = 0, size_t jitStackSize = 0); ---- [.small]#xref:BloombergLP/bdlpcre/RegEx/prepare-0e.adoc[_» more..._]# Prepare this regular‐expression object with the specified `pattern`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING> int xref:BloombergLP/bdlpcre/RegEx/prepare-06.adoc[prepare]( STRING* errorMessage, size_t* errorOffset, char const* pattern, int flags = 0, size_t jitStackSize = 0) requires bsl::is_same<STRING, bsl::string>::value || bsl::is_same<STRING, std::string>::value #ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING || bsl::is_same<STRING, std::pmr::string>::value; ---- [.small]#xref:BloombergLP/bdlpcre/RegEx/prepare-06.adoc[_» more..._]# == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *errorMessage* | null; compile‐error text is discarded | *errorOffset* | optionally receives the pattern offset of a compile error | *pattern* | null‐terminated regular‐expression pattern | *flags* | bit‐wise OR of `k_FLAG_*` prepare options | *jitStackSize* | size of the JIT stack if `k_FLAG_JIT` is set |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#