Method RegEx():create() Foundation

Creates a new RegEx instance.

Syntax
:create( <cPattern>, [<nOptions>] ) --> oRegEx
Parameters
<cPattern>
A string with the regular expression pattern.
<nOptions>
Optional PCRE compilation options specified as a bitmask. Refer to the method :setOptions() for a list of the supported options.
Return

A RegEx object.

Description

Creates and initializes a new RegEx object with a pattern and optional compilation options. The pattern is not compiled immediately but will be auto-compiled on first use. If this lazy compilation approach is not desired, the :precompile() method can be used to compile the pattern at a defined point in time. The :optimize() method can be used to improve the speed of pattern execution.

Create with pattern

oRegEx := RegEx():create("[A-Z][a-z]+") 
// Use oRegEx 
oRegEx:destroy() 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.