Does the string match a pattern?

isMatchingFixed(x, pattern, .xname = getNameInParent(x))

isMatchingRegex(x, pattern, .xname = getNameInParent(x))

isNotMatchingFixed(x, pattern, .xname = getNameInParent(x))

isNotMatchingRegex(x, pattern, .xname = getNameInParent(x))

allAreMatchingFixed(x, pattern, .xname = getNameInParent(x))

allAreMatchingRegex(x, pattern, .xname = getNameInParent(x))

allAreNotMatchingFixed(x, pattern, .xname = getNameInParent(x))

allAreNotMatchingRegex(x, pattern, .xname = getNameInParent(x))

Arguments

x

Object.

pattern

character(1). Pattern to use for matching.

.xname

Name of object defined in x. Not intended to be used directly.

Value

logical.

Functions

  • isMatchingFixed: Vectorized.

  • isMatchingRegex: Vectorized.

  • isNotMatchingFixed: Vectorized.

  • isNotMatchingRegex: Vectorized.

  • allAreMatchingFixed: Scalar.

  • allAreMatchingRegex: Scalar.

  • allAreNotMatchingFixed: Scalar.

  • allAreNotMatchingRegex: Scalar.

Note

Updated 2019-08-10.

See also

Examples

## TRUE ==== isMatchingRegex(x = "foobar", pattern = "^f")
#> foobar #> TRUE
isNotMatchingRegex(x = "foobar", pattern = "^b")
#> foobar #> TRUE
isMatchingFixed(x = "foobar", pattern = "bar")
#> foobar #> TRUE
isNotMatchingFixed(x = "foo", pattern = "bar")
#> foo #> TRUE