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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -