I\'m trying to use the stringr package in R to extract everything from a string up until the first occurrence of an underscore.
What I\'ve tried
The regex lookaround should be
str_extract("L0_123_abc", ".+?(?=_)") #[1] "L0"