I need to search for files which match some pattern which is similar to the pattern which is given on the command line in glob
style using boost
.
For example:
If the input is myFiles*.c
it should match the files myFiles.c , myFiles1.c, myFiles123.c
etc..
Tried using the boost::regex_match
with the perl
mode. But I had to give the input pattern as myfiles.*.c
instead of myFiles*.c
. I can recognise myfiles*.c
and translate it to myFiles.*.c
and give it to the boost::regex_match
in perl mode. But the input pattern could be any vaild regex in the glob style as it is given for the command line utilities.
Is there any way in boost so that the pattern is interpreted in the glob style ?
I haven't used boost before.
Any help ? Thanks.
You could try my glob_match. It's not Boost but it is C++.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With