0

I'm getting regex_error for some reason. I also tried it the regular way of using escape characters (this method eliminates the need for escape sequences in c++ 11 by putting R"(something)" )

By the way if anyone was wondering, they are for recognizing lines in xml

When I use a web based regex tester it works fine.

string sstart = R"(\w*+(> ? +[^\\])++>)";
string send = R"(.*<\\\w\w[^m-o][^_]++)";
string sdata = R"([^>]++>[^ ]++)";

regex endtag(send);
regex taganddata(sdata);
regex starttag(sstart);
fman
  • 230
  • 2
  • 10

1 Answers1

1

Syntax of you regular expressions is incorrect because of '++' part.

.+ matches one or more occurrences. But what do you try to match with .++ ?

CodeFuller
  • 30,317
  • 3
  • 63
  • 79
  • The second `+` is called possessive quantifier, see: http://stackoverflow.com/q/5319840/372239 – Toto May 22 '16 at 12:28