Answer the question
In order to leave comments, you need to log in
Regex regular expressions - how to do it right?
Let's say I have a line like this:
std::string str = "<html><body><a href=\"url\">name link</a><a href=\"url\">name link</a></body></html>";
std::string str = "(.*)(<a href=\">)(\\w*)(<\/a>)";
Answer the question
In order to leave comments, you need to log in
And if there is
<a lang="fr" href="url"></a>
then what?
and in the regular expression (\\w*) it will not catch your "name link" ;)
so there are problems with the regular expression
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question