Method Regexp.PCRE2._pcre()->create()

class Regexp.PCRE2._pcre

Method create

Regexp.PCRE2._pcre Regexp.PCRE2._pcre(string pattern, void|int options, void|object table)

Description

The option bits are:

OPTION.ALLOW_EMPTY_CLASS

Treat a closing square bracket that immediately follows an opening one as a class with no characters

OPTION.ALT_BSUX

Alter handling of \u, \U, and \x to closer match ECMAscript

OPTION.ANCHORED

Force pattern anchoring

OPTION.AUTO_CALLOUT

Automatically inserts callout items, all with number 255, before each pattern item, except immediately before or after an explicit callout in the pattern

OPTION.CASELESS

Do caseless matching

OPTION.DOLLAR_ENDONLY

$ not to match newline at end

OPTION.DOTALL

. matches anything including NL

OPTION.DUPNAMES

Names used to identify capture groups need not be unique

OPTION.ENDANCHORED

The end of any pattern match must be right at the end of the string being searched

OPTION.EXTENDED

Ignore whitespace and # comments

OPTION.FIRSTLINE

The 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_BACKREF

A backreference to an unset capture group matches an empty string

OPTION.MULTILINE

^ and $ match newlines within data

OPTION.NEVER_UCP

Locks out the use of Unicode properties

OPTION.NEVER_UTF

Locks out interpretation of the pattern as UTF-8, UTF-16, or UTF-32

OPTION.NO_AUTO_CAPTURE

Disable numbered capturing parentheses (named ones available)

OPTION.NO_AUTO_POSSESS

Disable "auto-possessification"

OPTION.NO_DOTSTAR_ANCHOR

Disables 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_OPTIMIZE

Disable start-up optimizations

OPTION.NO_UTF_CHECK

Disable checks for UTF validity

OPTION.UCP

Force the use of Unicode properties

OPTION.UNGREEDY

Invert greediness of quantifiers

OPTION.UTF

Regard 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_CIRCUMFLEX

A multiline circumflex also matches after a terminating newline

OPTION.ALT_VERBNAMES

Normal backslash processing is applied to verb names and only an unescaped closing parenthesis terminates the name

OPTION.EXTENDED_MORE

Like OPTION.EXTENDED but, in addition, unescaped space and horizontal tab characters are ignored inside a character class

OPTION.LITERAL

All meta-characters in the pattern are disabled, and it is treated as a literal string

OPTION.MATCH_INVALID_UTF

Enables support for matching in subject strings that contain invalid UTF sequences

OPTION.ALT_EXTENDED_CLASS

Alters the parsing of character classes to follow the extended syntax described by Unicode UTS#18