I want to extract only the second number (in order) from a string.
string = vancomycin 1G IV 3 times a day over 1 hour.
desired output = 3
CodePudding user response:
A posssible solution, but not the prettiest one
str_extract_all(string, "\\d ")[[1]][2]