[#BloombergLP-bdlpcre-RegEx] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlpcre.adoc[bdlpcre]::RegEx :relfileprefix: ../../ :mrdocs: Mechanism for compiling and matching regular expressions. == Synopsis Declared in `<bdlpcre_regex.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class RegEx; ---- == Description This class provides a mechanism for compiling and matching regular expressions. A regular expression approximately compatible with Perl 5.10 is compiled with the `prepare` method. Subsequently, strings are matched against the compiled (prepared) pattern using the overloaded `match` and `matchRaw` methods. Note that the underlying implementation uses the open‐source Perl Compatible Regular Expressions (PCRE2) library that was developed at the University of Cambridge (`http://www.pcre.org/`). == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlpcre/RegEx/_04enum-07.adoc[`Unnamed enum`] | Flags that may be supplied to `prepare` to affect matching behavior. | xref:BloombergLP/bdlpcre/RegEx/_04enum-0e.adoc[`Unnamed enum`] | Flags that may be supplied to `replace` to affect replacement behavior. | xref:BloombergLP/bdlpcre/RegEx/_04enum-02.adoc[`Unnamed enum`] | Status codes distinguishing among results of match operations. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlpcre/RegEx/2constructor.adoc[`RegEx`] [.small]#[constructor]# | Create a regular‐expression object in the "unprepared" state. | xref:BloombergLP/bdlpcre/RegEx/2destructor.adoc[`~RegEx`] [.small]#[destructor]# | Destroy this regular‐expression object. | xref:BloombergLP/bdlpcre/RegEx/clear.adoc[`clear`] | Free resources and put this object into the "unprepared" state. | xref:BloombergLP/bdlpcre/RegEx/depthLimit.adoc[`depthLimit`] | Return the evaluation recursion depth limit for this regular‐expression object. | xref:BloombergLP/bdlpcre/RegEx/flags.adoc[`flags`] | Return the flags from the most recent successful `prepare` call. | xref:BloombergLP/bdlpcre/RegEx/isPrepared.adoc[`isPrepared`] | Return `true` if this regular‐expression object is in the "prepared" state, and `false` otherwise. | xref:BloombergLP/bdlpcre/RegEx/jitStackSize.adoc[`jitStackSize`] | Return the explicitly configured JIT stack size, or 0. | xref:BloombergLP/bdlpcre/RegEx/match-08.adoc[`match`] | `match` overloads | xref:BloombergLP/bdlpcre/RegEx/matchRaw-088.adoc[`matchRaw`] | `matchRaw` overloads | xref:BloombergLP/bdlpcre/RegEx/namedSubpatterns-05.adoc[`namedSubpatterns`] | `namedSubpatterns` overloads | xref:BloombergLP/bdlpcre/RegEx/numSubpatterns.adoc[`numSubpatterns`] | Return the number of sub‐patterns in the pattern held by this regular‐expression object (`pattern()`). The behavior is undefined unless `isPrepared() == true`. | xref:BloombergLP/bdlpcre/RegEx/pattern.adoc[`pattern`] | Return a reference to the non‐modifiable pattern held by this regular‐expression object. The behavior is undefined unless `isPrepared() == true`. | xref:BloombergLP/bdlpcre/RegEx/prepare-08.adoc[`prepare`] | `prepare` overloads | xref:BloombergLP/bdlpcre/RegEx/replace-05.adoc[`replace`] | `replace` overloads | xref:BloombergLP/bdlpcre/RegEx/replaceRaw-0fe.adoc[`replaceRaw`] | `replaceRaw` overloads | xref:BloombergLP/bdlpcre/RegEx/setDepthLimit.adoc[`setDepthLimit`] | Set the evaluation recursion depth limit for this object. | xref:BloombergLP/bdlpcre/RegEx/subpatternIndex.adoc[`subpatternIndex`] | Return the 1‐based index of the named sub‐pattern, or ‐1. | xref:BloombergLP/bdlpcre/RegEx/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<RegEx, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlpcre/RegEx/defaultDepthLimit.adoc[`defaultDepthLimit`] | Return the process‐wide default evaluation recursion depth limit. | xref:BloombergLP/bdlpcre/RegEx/isJitAvailable.adoc[`isJitAvailable`] | Return whether just‐in‐time compiling is supported on this platform. | xref:BloombergLP/bdlpcre/RegEx/setDefaultDepthLimit.adoc[`setDefaultDepthLimit`] | Set the process‐wide default evaluation recursion depth limit. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlpcre/RegEx/k_INVALID_OFFSET.adoc[`k_INVALID_OFFSET`] | Value used to denote an invalid offset for match methods returning pairs. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#