How can I extract the extension of a file given a file path as a character? I know I can do this via regular expression regexpr("\.([[:alnum:]]+)$", x)
, but wondering if there's a built-in function to deal with this?
How can I extract the extension of a file given a file path as a character? I know I can do this via regular expression regexpr("\.([[:alnum:]]+)$", x)
, but wondering if there's a built-in function to deal with this?