-
-
Save cdglove/ce7c4df4d5aadf1697e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void xpressive_csv(std::string raw_csv, std::set<std::string>& dest_set) | |
{ | |
using namespace boost::xpressive; | |
sregex re = +(+alnum); | |
std::transform( | |
sregex_iterator(raw_csv.begin(), raw_csv.end(), re), | |
sregex_iterator(), | |
std::inserter(dest_set, dest_set.begin()), | |
[](smatch const& match) | |
{ | |
return match[0]; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment