utils_regmatches_if_not_empty {podcleaner}R Documentation

Conditionally amend character string vector.

Description

Searches for non-empty string in provided character string vector. If found searches for alternative pattern in an alternative character string and returns any match or an empty string if none.

Usage

utils_regmatches_if_not_empty(
  string_filter,
  string_search,
  regex_search,
  ignore_case_search
)

Arguments

string_filter

A Character string vector.

string_search

Alternative character string to search into for the pattern provided in regex_search below

regex_search

Alternative pattern provided as a character string regex to look for in the alternative character string provided in string_search above.

ignore_case_search

Boolean specifying whether case should be ignored (TRUE) or not (FALSE) in search for regex_search in string_search.

Value

A list of character string vectors.

Examples

## Not run: 
  utils_regmatches_if_not_empty(
    c("glasgow-entrepreneurs", "", "aberdeen-entrepreneurs"),
    "edinburgh-entrepreneurs" , "^edinburgh", TRUE
  )

## End(Not run)

[Package podcleaner version 0.1.2 Index]