stri_count_regex
and other stringi-search-regex functions.stri_opts_regex(case_insensitive, comments, dotall, literal, multiline,
unix_lines, uword, error_on_unknown_escapes)
(?i)
](?x)
].
` matches line terminators,
otherwise matching of `.
` stops at a line end [regex flag (?s)
]$
` and `^
`.
If set, recognize line terminators within a string, otherwise,
match only at start and end of input string [regex flag (?m)
]U+000a
is recognized as a
line ending by `.
`, `$
`, and `^
`.(?w)
]
See "(?i)pattern"
does
a case-insensitive match of a given pattern,
see the enum URegexpFlag
: Constants for Regular Expression Match Modes
-- ICU4C API Documentation,
Regular Expressions -- ICU User Guide,
stringi-search-regex
;
stringi-search
stri_detect_regex("ala", "ALA") # case-sensitive by default
stri_detect_regex("ala", "ALA", stri_opts_regex(case_insensitive=TRUE))
stri_detect_regex("ala", "(?i)ALA") # equivalent
Run the code above in your browser using DataLab