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 - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -