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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -