grab string until - code example
Example: r extract everything before character
library(stringr)
str = c("1", "1_ghfjv", "1")
str_extract(string = str, pattern = "[^_]"))
library(stringr)
str = c("1", "1_ghfjv", "1")
str_extract(string = str, pattern = "[^_]"))