Internal protect helper (deletes the separators around protected regex matches).

protect_internal(string, protect = NULL)

Arguments

string

A string (for example names of a data frame).

protect

A string which is a valid stringr::regex(). Matches within the output won't have any "_" (or artifacts of preprocess) beside. Note that preprocess has a higher precedence than protect, which means that it doesn't make sense to protect sth. which is already replaced via preprocess.

Value

A character vector.