Seems bizarrely dependent on the length of the path. Tbh, I have no idea how it's meant to work but it fails with...`gsub('/.*?/','', c("/A/B/C/abc", "/abc"))`. Probably, you just want the `basename` function.
– FrankAug 28 '17 at 16:49
1
Thanks for the heads up on the dot. Frank, I assumed these were not file paths and were a list of companies or something in the strict format listed.
– BalterAug 28 '17 at 16:54
1
@Frank The multiple slashes in your example would require a different pattern. Balter's solution matches the first forward slash, then more than one of any character, until another forward slash is matched.
– Mako212Aug 28 '17 at 16:55