I can mention two books that did NOT do a good for me:
"Problem Solving with C++ - The Object of Programming"
"Data Structures and Other objects Using C++"
Both by Walter Savitch.
Decided to abandon the regex and using string methods instead to locate and extract data.
Still, I'm curious as to how matches in regex are to be understood.
Thanks for the quick replies Alt and Levenson.
@Levenson: I get the same error ("repetition-operator operand invalid") when using the complete regex you provided. If I substitute the (.*?) with your ([^<>]+) I get the correct match, but only one match.
I think maybe I'm misunderstanding...
Hi.
I'm working on a method that should search a string of text and extract text in-between tags, and store the resulting strings in a vector<string> to be returned.
Example:
string to search: "dummy<t>test</t><t>test2</t>dummy"
tags: "<t>", "</t>"
desired result strings in vector...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.