1. Greg12/30/2009 16:06:16
Thanks for the post, and Ray for your comment! This is just what I needed. In my case, I needed to work with multiple wildcard patterns, such as *.zip AND *.xml at the same time, as well as ignore anything with a .include extension, so I ended up sticking a (?!.*\.ignore$) at the start of the regex and called your code in a loop, resulting in the following, which I've posted in the hopes that someone would find it helpful:
^(?!.*\.ignore$)(.*\.xml)|(.*\.zip)$
2. Ray10/04/2008 19:18:03
One small improvement, make your return string start with ^ and end with $
At the moment if you supplied ello*.* it would match yellow.txt which it shouldn't!