regex - Drop values between two characters in a string -


this question has answer here:

suppose have multiple forms of following string

x <- "/users/name/google drive/thesis/data/data x , y/uk//5port/5groups.csv" 

i want drop values between first / , last / return 5groups.csv. used gsub couldn't find how specify pattern.

my question same this 1 in r.

if using sub

sub('.*\\/', '', x) #[1] "5groups.csv" 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -