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


Reply via email to