field_format: Check whether a field conforms to a regular expression

View source: R/genericrules.R

field_formatR Documentation

Check whether a field conforms to a regular expression

Description

A convenience wrapper around grepl to make rule sets more readable.

Usage

field_format(x, pattern, type = c("glob", "regex"), ...)

Arguments

x

Bare (unquoted) name of a variable. Otherwise a vector of class character. Coerced to character as necessary.

pattern

[character] a regular expression

type

[character] How to interpret pattern. In globbing, the asterisk (‘*') is used as a wildcard that stands for ’zero or more characters'.

...

passed to grepl

See Also

Other format-checkers: field_length(), number_format()


validate documentation built on March 31, 2023, 6:27 p.m.