[delphizip] Match2 with windows-like wildcards preview

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Fri, 29 Mar 2002 08:40:37 +1100

I have made a version of match to use windows-like matching but have not 
extensively tested it yet. (for those without compilers, I recompiled the 1.60 
version of the dll's (changed version to 1.61) with Builder 5;
To force checking with new method prefix it with a semicolon ';' .
I break the pattern and string into 3 parts and then match them-
1. path - beginning (after ;) to last '/' or '\\'  can include dots
2. name - from end of path to first dot
3. ext - from first dot (after path) to end can include more dots
ie
;*\*.* - matches any file with any ext in any path (file.ext and path\file.ext 
both match)
;*.* - matches any file with any ext in base dir only (matches file.ext not 
path\file.ext)
;*\final\*.* - all files in path ending '\final\'
;dir*\*.* - all files in path starting 'dir'

Please try it and let me know what you think (but please keep it polite)

- Russell Peters



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.343 / Virus Database: 190 - Release Date: 22/03/2002

Other related posts:

  • » [delphizip] Match2 with windows-like wildcards preview