-
- if (reg1.exact_match(token)) {
- LRegex::SubMatches const & sub = reg1.exec(token);
- foundfile = LSubstring(token, sub[1].first,
- sub[1].second);
- } else if (reg2.exact_match(token)) {
- LRegex::SubMatches const & sub = reg2.exec(token);
- foundfile = LSubstring(token, sub[1].first,
- sub[1].second);
- } else if (reg3.exact_match(token)) {
- LRegex::SubMatches const & sub = reg3.exec(token);
- foundfile = LSubstring(token, sub[1].first,
- sub[1].second);
- } else if (reg4.exact_match(token)) {
- LRegex::SubMatches const & sub = reg4.exec(token);
- foundfile = LSubstring(token, sub[1].first,
- sub[1].second);
+
+#ifndef USE_INCLUDED_STRING
+ smatch sub;
+#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));