Method Regexp.PCRE2._pcre()->create()
classRegexp.PCRE2._pcre
- Method
create
Regexp.PCRE2._pcre Regexp.PCRE2._pcre(stringpattern,void|intoptions,void|objecttable)- Description
The option bits are:
OPTION.ALLOW_EMPTY_CLASSTreat a closing square bracket that immediately follows an opening one as a class with no characters
OPTION.ALT_BSUXAlter handling of \u, \U, and \x to closer match ECMAscript
OPTION.ANCHOREDForce pattern anchoring
OPTION.AUTO_CALLOUTAutomatically inserts callout items, all with number 255, before each pattern item, except immediately before or after an explicit callout in the pattern
OPTION.CASELESSDo caseless matching
OPTION.DOLLAR_ENDONLY$ not to match newline at end
OPTION.DOTALL. matches anything including NL
OPTION.DUPNAMESNames used to identify capture groups need not be unique
OPTION.ENDANCHOREDThe end of any pattern match must be right at the end of the string being searched
OPTION.EXTENDEDIgnore whitespace and # comments
OPTION.FIRSTLINEThe start of an unanchored pattern match must be before or at the first newline in the subject string following the start of matching
OPTION.MATCH_UNSET_BACKREFA backreference to an unset capture group matches an empty string
OPTION.MULTILINE^ and $ match newlines within data
OPTION.NEVER_UCPLocks out the use of Unicode properties
OPTION.NEVER_UTFLocks out interpretation of the pattern as UTF-8, UTF-16, or UTF-32
OPTION.NO_AUTO_CAPTUREDisable numbered capturing parentheses (named ones available)
OPTION.NO_AUTO_POSSESSDisable "auto-possessification"
OPTION.NO_DOTSTAR_ANCHORDisables an optimization that is applied when .* is the first significant item in a top-level branch of a pattern, and all the other branches also start with .* or with \A or \G or ^
OPTION.NO_START_OPTIMIZEDisable start-up optimizations
OPTION.NO_UTF_CHECKDisable checks for UTF validity
OPTION.UCPForce the use of Unicode properties
OPTION.UNGREEDYInvert greediness of quantifiers
OPTION.UTFRegard both the pattern and the subject strings that are subsequently processed as strings of UTF characters instead of single-code-unit strings
OPTION.NEVER_BACKSLASH_CĹock out the use of \C in the pattern that is being compiled
OPTION.ALT_CIRCUMFLEXA multiline circumflex also matches after a terminating newline
OPTION.ALT_VERBNAMESNormal backslash processing is applied to verb names and only an unescaped closing parenthesis terminates the name
OPTION.EXTENDED_MORELike OPTION.EXTENDED but, in addition, unescaped space and horizontal tab characters are ignored inside a character class
OPTION.LITERALAll meta-characters in the pattern are disabled, and it is treated as a literal string
OPTION.MATCH_INVALID_UTFEnables support for matching in subject strings that contain invalid UTF sequences
OPTION.ALT_EXTENDED_CLASSAlters the parsing of character classes to follow the extended syntax described by Unicode UTS#18