Skip to contents

Break string into list of strings by some fixed character and then extract the desired values around that fixed character

Usage

split_string(string_to_split, break_by, to_extract, fixed = TRUE)

Arguments

string_to_split

character: string to be split

break_by

character: character to break string by

to_extract

integer: index of the string to be extracted

fixed

If TRUE match exactly, otherwise use regular expressions

Value

a character vector of the extracted strings

Author

Shahryar Minhas