regex_must_not_match: Create a 'must not match' regex rule

View source: R/regex.R

regex_must_not_matchR Documentation

Create a 'must not match' regex rule

Description

Attach a standardized error message to a regex argument that specifies that the pattern must not be matched. This is a wrapper around regex_must_match() that sets the negate attribute to TRUE.

Usage

regex_must_not_match(regex)

Arguments

regex

(character) The regular expression pattern.

Value

The regex value with a negate attribute and with names() equal to the generated "must not match" error message.

Examples

regex_must_not_match("[aeiou]")

stbl documentation built on Nov. 5, 2025, 6:02 p.m.