in reply to Reg Exp help

you could always use the built in module File::Basename, and then use fileparse.
#!/usr/bin/env perl #use strict; #use warnings; use File::Basename; while (<DATA>) { my($name, $dir, $ext) = (fileparse($_,'\..*')); print $dir,"\n" if !$ext; } __DATA__ \windows\server\locales\en_US\help\whxdata\whftdata0.xml \windows\server\locales\en_US\help\whxdata\ \windows\server\locales\en_US\help\whxdata\whfwdata0.xml \windows\server\locales\en_US\help\whxdata\whfwdata1.xml \windows\server\locales\en_US\help\whxdata\whfwdata2.xml \windows\server\locales\en_US\help\whxdata2\
Produces
\windows\server\locales\en_US\help\whxdata\ \windows\server\locales\en_US\help\whxdata2\