klyn.regex.RegEx.flags
property
public property flags as Int
Description

Regular-expression option bits. Bit 1 enables case-insensitive matching. Case equivalence uses locale-independent Unicode single-scalar mappings, including ranges and backreferences. It does not expand one scalar into several (for example, sharp-s is not equivalent to the string ss). Groups, replacements and positions retain the original input text. Assigning a new value recompiles the expression before its next use.

regex = RegEx("^a$")
regex.flags = 1
assert regex.matches("A")
assert RegEx("^é$", flags=1).matches("É")