Skip to content

Commit

Permalink
Fix ignoreEmptyMatches
Browse files Browse the repository at this point in the history
  • Loading branch information
congard committed Mar 24, 2020
1 parent e13a175 commit 709567b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/string_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ std::vector<Matches> findRegex(const std::string &src, const std::string &_regex
for (auto i = std::sregex_iterator(src.begin(), src.end(), regex); i != std::sregex_iterator(); ++i) {
std::vector<std::string> strings;
for (size_t j = 0; j < i->size(); j++) {
if (!ignoreEmptyMatches && i->operator[](j).str().empty())
if (ignoreEmptyMatches && i->operator[](j).str().empty())
continue; // ignore empty matches
strings.emplace_back(i->operator[](j).str());
}
Expand Down

0 comments on commit 709567b

Please sign in to comment.