Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regexp help 1

Status
Not open for further replies.

haddaway

Programmer
Jul 6, 2005
172
0
0
SE
I need help on a regexp. I am copying files and would like to have a "exclude"-filter. So, I have a filepath:

c:\myfiles\myfile.txt

and the filter in a normal file mask filter:

*.*

or:

*.txt

or a file:
anotherfile.txt

I want to now which file paths that are matching this filter with the help of a regexp. It would be great if I could to the regexp on the whole path (I think that may be faster than converting the path to a filename, please correct me).

Thank you.
 
yes, I do that, but I want to use both an include and exclude filter. The getfiles helps me with the include, but I also want to exclude on the "included files".

thanks
 
Although I do not see the benefit of searching through all files and then programatically remove the "excluded" ones instead of filtering them the first time, you can find info on a cheat sheet here
Some useful tools for writing and testing the regexps are and
You will need a particular regexp for each particular case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top