- if (reg.exact_match(line)) {
- LRegex::SubMatches const & sub = reg.exec(line);
- int const n = lyx::atoi(line.substr(sub[1].first,
- sub[1].second));
- string const str = LSubstring(line, sub[2].first,
- sub[2].second);
+#ifndef USE_INCLUDED_STRING
+ smatch sub;
+#else
+ cmatch sub;
+#endif
+ if (regex_match(STRCONV(line), sub, reg)) {
+ int const n = lyx::atoi(STRCONV(sub.str(1)));
+ string const str = STRCONV(sub.str(2));