Couldn't it be: m#^([^\\/]+)(.*)([^\\/]+)$# )
At Thursday, 31 January 2002, [EMAIL PROTECTED] wrote: >I know this is not a good RegEx. Can I see some criticism and fine- tuning of >this RegEx that I came up with? > >Objective: To parse the path to drive, directory and file name. > >Here is what I came up with. > >################################# >$fullpath = "C:/TopDir/outer/inner/file.fl"; >($drive, $path, $file) = ($fullpath =~ /(\w?):\/((?:\w+\/)*)(\w+\. \w+)$/); >print("$drive\n $path\n $file"); >################################### > >TIA, >Rex > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]