I am using Boost to match substrings in a string. Io iterate over the results, I need to use regex_iterator().
That is the only usage example I have found, but I do not understand the callback. Could someone give me an example uage of the function?
Let us assume that my input text is:
"Hello everybody this is a sentense
Bla bla 14 .. yes
date 04/15/1986
"
I want to get:
"Hello" "everybody" "this" "is" "a" "sentense" "bla" "yes" "date"
If the only part of the example you don’t understand is the callback, consider that:
is roughly equivalent to:
Assuming that, in your case, you want to store all the matches in a vector, you would write something like: