Skip to content
Prev 343173 / 398513 Next

regex pattern assistance

Hello,

I don't believe you need an extra package for that. Try


sub("\\/mnt\\/AO\\/AO Data\\/([-[:alnum:]]*)\\/.+", "\\1", x)

or, with package stringr,

str_match(x,"\\/mnt\\/AO\\/AO Data\\/(.+)\\/.+")


Hope this helps,

Rui Barradas

Em 15-08-2014 17:18, Tom Wright escreveu: