str_detect_all {strex} | R Documentation |
Detect any or all patterns.
Description
Vectorized over string
.
Usage
str_detect_all(string, pattern, negate = FALSE)
str_detect_any(string, pattern, negate = FALSE)
Arguments
string |
A character vector. |
pattern |
A character vector. The patterns to look for. Default is
|
negate |
A flag. If |
Value
A character vector.
Examples
str_detect_all("quick brown fox", c("x", "y", "z"))
str_detect_all(c(".", "-"), ".")
str_detect_all(c(".", "-"), coll("."))
str_detect_all(c(".", "-"), coll("."), negate = TRUE)
str_detect_all(c(".", "-"), c(".", ":"))
str_detect_all(c(".", "-"), coll(c(".", ":")))
str_detect_all("xyzabc", c("a", "c", "z"))
str_detect_all(c("xyzabc", "abcxyz"), c(".b", "^x"))
str_detect_any("quick brown fox", c("x", "y", "z"))
str_detect_any(c(".", "-"), ".")
str_detect_any(c(".", "-"), coll("."))
str_detect_any(c(".", "-"), coll("."), negate = TRUE)
str_detect_any(c(".", "-"), c(".", ":"))
str_detect_any(c(".", "-"), coll(c(".", ":")))
str_detect_any(c("xyzabc", "abcxyz"), c(".b", "^x"))
[Package strex version 2.0.0 Index]