I have a string:
<tag1 qwer=123>Hello</tag1>
And I want a regex that will have a single match for its inner content:
Hello
Using the following code:
string s = "<tag1>Hello</tag1>";
smatch sm;
regex re("<tag1>([\\s\\S]*?)</tag1>");
regex_match(s, sm, re);
I get one match and one its submatch:
<tag1>Hello</tag1>
Hello
What regex should I use to get simply one match:
Hello
Thanks!