powered by
Searches for specified pattern in provided character string. Return pasted provided character string(s) if found or provided default character string if not.
utils_paste_if_found(regex_filter, string_filter, default, ignore_case, ...)
Pattern to look for provided as a character string regex.
Character string vector to search into for the pattern provided in regex_filter above.
regex_filter
Character string returned if pattern provided in regex_filter not found.
Boolean specifying whether case should be ignored (TRUE) or not (FALSE).
TRUE
FALSE
Character string(s) to be paste together using a space as separator and returned if pattern provided in regex_filter found.
A character string vector.
# NOT RUN { utils_paste_if_found( "^glasgow", c("glasgow-entrepreneurs", "aberdeen-entrepreneurs"), "pattern not found", TRUE, "pattern", "found" ) # }
Run the code above in your browser using DataLab