Say i have this string:
str <- "a//b/c"
Desired Output:
c("a//b", "c").
So i want to split on /, but not on //.
What i tried:
Following https://stackoverflow.com/a/7317087/8538074 i tried:
strsplit(split = "[[]^//[]]|/", x = "a//b/c", perl = TRUE)
(For non R-user: One Needs to escape Special characters in R, so "[" becomes "[[]", not sure this is common in all other languages.)