hello Monks,
I seek your advise on the following situtation.
I need to extract filename and the dir path in which this filename is located. This has to be done from the root-level of a particular dir.
In the script that am writing, I followed this regex to extract the dirname and filename.
$abspath =~ /\/\w+(.txt|.doc|.pdf|.vsd|.xls|.xlt|.dot|.pot|.ppt|.mpp)$/;
with thie regex, the following are matched :
Framework/Templates_Doc.Conventions/CSSP_TPL_Process_Procedure_Description.xls
Framework/Templates_Doc.Conventions, , /CSSP_TPL_Training_Material.pot
but the following are not matched.
Framework/Templates_Doc.Conventions/CSSP_TPL_Excel_Meta-Template.xlt
Engineering/SBI/PD_PRC/Overall_SWReleaseFlow_v0.1.vsd
Could you pls. share your wisdom on how to solve this regex ?
thanks in advance,
Mars
2005-11-10 Retitled by planetscape, as per Monastery guidelines
Original title: 'regular expression on filenames with aboslute path'
In reply to regular expression on filenames with absolute path by ramthen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |