Skip to content

Extracting File Basename without Extension

26 messages · Gundala Viswanath, jim holtman, Henrique Dallazuanna +8 more

Messages 26–26 of 26

#
Gabor Grothendieck wrote:
cool, i see ?xism is supported.  so the above can be written in r as:

names = c("foo.bar", ".zee")
sub("(?x) # alloow embedded comemnts
     (.+) # match and remember at least one arbitrary character
    [.] # match a dot
    [^.]+ # match at least one non-dot character
    $ # end of string anchor",
        "\\1", names, perl=TRUE)

is this what you wanted, roland?

vQ