| 98 | } |
| 99 | |
| 100 | std::vector<std::string> regex_split(std::string const& text, std::regex const& re) |
| 101 | { |
| 102 | std::vector<std::string> ret; |
| 103 | for (auto it = std::sregex_token_iterator(text.begin(), text.end(), re, -1); |
| 104 | it != std::sregex_token_iterator(); |
| 105 | ++it) { |
| 106 | ret.emplace_back(*it); |
| 107 | } |
| 108 | return ret; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | namespace docopt { |