in reply to Re: Probably silly regex question / not so silly regex question
in thread Probably silly regex question / not so silly regex question

As for the first question (posted over a year ago... whew), this is a pretty easy way to do it: $file = $filename; $ext = $filename; $file =~ s/.+\\(^\\+)$|.+\/(^\/+)$/$1/; $ext =~ s/\.(\w+)$/$1/; That should give you the file's name in $file and it's extension in, well, $ext. ;) - Dave Baughman
  • Comment on Re: Re: Probably silly regex question / not so silly regex question