Is there a standard C++ wildcard filter / matcher class?
If I am looking through a list of files in a directory using OpenDir(), I want to be able to do wild card pattern matches.
Under Microsoft's MFC you can specify this with FindFiles like "BA*12??.*.DA*" or something crazy like that. Using the ANSI equivalent, OpenDir() I can't do that.
I could write my own wild-card filter, but I would rather use something pre-made instead.
Re: Is there a standard C++ wildcard filter / matcher class?
Hi,
no, such thing does not exist in the standard C libraries. You might want to use boost´s RegEx library.
Boost
Regards,
Guido
Re: Is there a standard C++ wildcard filter / matcher class?
I would suggest using both boost::filesystem and boost::regex. They are both portable and powerful.
Jeff
Re: Is there a standard C++ wildcard filter / matcher class?
I was looking at the License am not totally sure what it means. Can I use that code in a commercial product that isn't open source for free?
Re: Is there a standard C++ wildcard filter / matcher class?
Yes. You can use it, change it, redistribute it. It can be used in open source and commercial projects. It's a completely open license that is much more relaxed than GPL, for instance. It does not contain the gnu open source 'virus'.
Jeff