JPNaude
2nd December 2011, 13:41
Hi Guys
I'm struggling to figure out how to match sets of characters using QRegExp in Wildcard pattern syntax.
I've tried many things but nothing wants to work. I'm trying to match a set of files ending in .flw and .ngc and I've tried the following:
QRegExp rx("*.flw *.ngc");
QRegExp rx("[*.flw *.ngc]");
QRegExp rx("[*.flw][*.ngc");
QRegExp rx("[*.flw]+[*.ngc]");
I've read the documentation but does not understand what means exactly:
[...] Sets of characters can be represented in square brackets, similar to full regexps. Within the character class, like outside, backslash has no special meaning.
Any guidance will be appreciated.
Thanks,
Jaco
I'm struggling to figure out how to match sets of characters using QRegExp in Wildcard pattern syntax.
I've tried many things but nothing wants to work. I'm trying to match a set of files ending in .flw and .ngc and I've tried the following:
QRegExp rx("*.flw *.ngc");
QRegExp rx("[*.flw *.ngc]");
QRegExp rx("[*.flw][*.ngc");
QRegExp rx("[*.flw]+[*.ngc]");
I've read the documentation but does not understand what means exactly:
[...] Sets of characters can be represented in square brackets, similar to full regexps. Within the character class, like outside, backslash has no special meaning.
Any guidance will be appreciated.
Thanks,
Jaco