regex sep("[
]*[,;.][
]*"); // separated by , ; or . and spaces
Alternatively, we could use the following regular expression (see Section 14.8, page 738):
regex sep("[[:space:]]*[,;.][[:space:]]*"); // separated by , ; or . and spaces
Because we are interested only in the values between these token separators, the program processes each name in this list (with spaces removed).
Note that the interface of regex_token_iterator allows you to specify the tokens of interest in various ways:
• You can pass a single integral value.
• You can pass an initializer list of integral values (see Section 3.1.3, page 15).
• You can pass a vector of integral values.
• You can pass an array of integral values.
und: