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
Using gsub...
gsub("(.+?)(\\_.*)", "\\1", "L0_123_abc")