System: Windows 10, R 3.6.2
I import the data from an EXCEL file into a data.frame. One variable has values like this:
What I want is to extract the data before the first "\", and create a new variable.
I tried split, str.split, str_extract, and gsub, and none of them works. I think the main problem is the separative sign, but I still don't know how to work around. I really appreciate if anyone can help me with this.

 
     
    