Description Usage Arguments Value References See Also Examples
A convenience function to tune regular expressions matcher
behavior, e.g. in stri_count_regex
and other
stringi-search-regex functions.
1 2 | stri_opts_regex(case_insensitive, comments, dotall, literal, multiline,
unix_lines, uword, error_on_unknown_escapes)
|
case_insensitive |
logical; enable case insensitive matching |
comments |
logical; allow white space and comments within patterns |
dotall |
logical; if set, ' |
literal |
logical; if set, treat the entire pattern
as a literal string: metacharacters or escape sequences
in the input sequence will be given no special meaning;
note that in most cases you would rather use the
stringi-search-fixed facilities in this case (with
|
multiline |
logical; controls the behavior of
' |
unix_lines |
logical; Unix-only line endings. When
this mode is enabled, only |
uword |
logical; Unicode word boundaries. If set, uses the Unicode TR 29 definition of word boundaries; warning: Unicode word boundaries are quite different from traditional regex word boundaries. See http://unicode.org/reports/tr29/#Word_Boundaries |
error_on_unknown_escapes |
logical; whether to generate an error on unrecognized backslash escapes; if set, fail with an error on patterns that contain backslash-escaped ASCII letters without a known special meaning; otherwise, these escaped letters represent themselves. Note that some regex options may be changed using ICU
regex flag settings inside regexes. For example,
|
Returns a named list object; missing options are left with default values.
enum URegexpFlag
: Constants for Regular
Expression Match Modes – ICU4C API Documentation,
http://www.icu-project.org/apiref/icu4c/uregex_8h.html
Regular Expressions – ICU User Guide, http://userguide.icu-project.org/strings/regexp
Other search_regex: stri_count_regex
;
stri_detect_regex
;
stri_extract_all_regex
,
stri_extract_all_regex
,
stri_extract_first_regex
,
stri_extract_first_regex
,
stri_extract_last_regex
,
stri_extract_last_regex
;
stri_locate_all_regex
,
stri_locate_all_regex
,
stri_locate_first_regex
,
stri_locate_first_regex
,
stri_locate_last_regex
,
stri_locate_last_regex
;
stri_match_all_regex
,
stri_match_all_regex
,
stri_match_first_regex
,
stri_match_first_regex
,
stri_match_last_regex
,
stri_match_last_regex
;
stri_replace_all_regex
,
stri_replace_all_regex
,
stri_replace_first_regex
,
stri_replace_first_regex
,
stri_replace_last_regex
,
stri_replace_last_regex
;
stri_split_regex
,
stri_split_regex
;
stringi-search-regex
;
stringi-search
1 2 3 4 5 6 | ## Not run:
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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.