- if (regex_match(token, sub, reg1)) {
- foundfile = sub[1];
- } else if (regex_match(token, sub, reg2)) {
- foundfile = sub[1];
- } else if (regex_match(token, sub, reg3)) {
- foundfile = sub[1];
- } else if (regex_match(token, sub, reg4)) {
- foundfile = sub[1];
- } else if (regex_match(token, sub, reg5)) {
- foundfile = sub[1];
+#else
+ cmatch sub;
+#endif
+ if (regex_match(STRCONV(token), sub, reg1)) {
+ foundfile = STRCONV(sub.str(1));
+ } else if (regex_match(STRCONV(token), sub, reg2)) {
+ foundfile = STRCONV(sub.str(1));
+ } else if (regex_match(STRCONV(token), sub, reg3)) {
+ foundfile = STRCONV(sub.str(1));
+ } else if (regex_match(STRCONV(token), sub, reg4)) {
+ foundfile = STRCONV(sub.str(1));
+ } else if (regex_match(STRCONV(token), sub, reg5)) {
+ foundfile = STRCONV(sub.str(1));