Quantcast
Viewing all articles
Browse latest Browse all 11

C++11 Regular Expression

OK. I may not have got it.

Let me put my question in another way

regex r1("<.*>.*<.*>");
regex r2("<(.*)>(.*)</(\\1)>");

What does the r1 search for and what does the r2 search for?

Can you give with an example?

In the second case, we are using the capture group as we wanted to refer it later in the regex ( like \1 ), where we want to have the same match as the first group. Am I correct?


Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>