Z
Z
Zaur Abdulgalimov2015-10-21 13:14:07
C++ / C#
Zaur Abdulgalimov, 2015-10-21 13:14:07

How to specify from where to look for a regular expression?

I do a search in a string using a regular expression:
regex_search(source, match, reg);
I need to go through all the matches in a string:

while (regex_search(source, match, reg)) {
    // ....
}

In this case, while loops on the first match, how do I tell it to search from where it was found in the previous iteration of the while?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MiiNiPaa, 2015-10-21
@abdulgalimov

Use regex_iterator .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question