REGEXP_* Constant Group

From NWN Lexicon
Jump to navigationJump to search


The type of grammar to use for regular expression matching when using RegExpMatch and RegExpIterate. These are not to be used with RegExpReplace, for that see REGEXP_MATCH.

These can be bitflagged (add the values together), however at most one grammar option must be chosen out of ECMAScript, basic, extended, awk, grep, egrep.

Constants

Constant Value Description
REGEXP_ECMASCRIPT 0
Use the Modified ECMAScript regular expression grammar (https://en.cppreference.com/w/cpp/regex/ecmascript)
REGEXP_BASIC 1
Use the basic POSIX regular expression grammar (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03).
REGEXP_EXTENDED 2
Use the extended POSIX regular expression grammar (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04).
REGEXP_AWK 4
Use the regular expression grammar used by the awk utility in POSIX (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_04).
REGEXP_GREP 8
Use the regular expression grammar used by the grep utility in POSIX. This is effectively the same as the basic option with the addition of newline '\n' as an alternation separator.
REGEXP_EGREP 16
Use the regular expression grammar used by the grep utility, with the -E option, in POSIX. This is effectively the same as the extended option with the addition of newline '\n' as an alternation separator in addition to '|'.
REGEXP_ICASE 32
Character matching should be performed without regard to case.
REGEXP_NOSUBS 64
When performing matches, all marked sub-expressions (expr) are treated as non-marking sub-expressions (?:expr).

See Also

functions: 

REGEXP_MATCH

REGEXP_FORMAT

Version

This constants group was added in 87.8193.35-40 of NWN:EE.