Learn R Programming

tableschema.r (version 1.1.2)

constraints.checkPattern: Pattern matching

Description

Search for pattern matches (value) within a character vector (constraint). A regular expression is used to test field values. If the regular expression matches then the value is valid. The values of this field MUST conform to the standard XML Schema regular expression syntax.

Usage

constraints.checkPattern(constraint, value)

Value

TRUE if the pattern constraint is met

Arguments

constraint

character vector where matches are sought

value

character string to be matched

See Also

Examples

Run this code

constraints.checkPattern(constraint = '^test$', value = 'test')

constraints.checkPattern(constraint = '^test$', value = 'TEST')

Run the code above in your browser using DataLab