Skip to contents

Does the string match a pattern?

Usage

isMatchingFixed(x, pattern)

isMatchingRegex(x, pattern)

isNotMatchingFixed(x, pattern)

isNotMatchingRegex(x, pattern)

allAreMatchingFixed(x, pattern)

allAreMatchingRegex(x, pattern)

allAreNotMatchingFixed(x, pattern)

allAreNotMatchingRegex(x, pattern)

allAreSystemCommands(x)

Arguments

x

Object.

pattern

character(1). Pattern to use for matching.

Value

logical.

Functions

  • isMatchingFixed(): Vectorized.

  • isMatchingRegex(): Vectorized.

  • isNotMatchingFixed(): Vectorized.

  • isNotMatchingRegex(): Vectorized.

  • allAreMatchingFixed(): Scalar.

  • allAreMatchingRegex(): Scalar.

  • allAreNotMatchingFixed(): Scalar.

  • allAreNotMatchingRegex(): Scalar.

  • allAreSystemCommands(): Scalar.

Note

Updated 2022-12-14.

See also

Examples

## TRUE ====
isMatchingRegex(x = "foobar", pattern = "^f")
#> [1] TRUE
isNotMatchingRegex(x = "foobar", pattern = "^b")
#> [1] TRUE

isMatchingFixed(x = "foobar", pattern = "bar")
#> [1] TRUE
isNotMatchingFixed(x = "foo", pattern = "bar")
#> [1] TRUE