diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 49ade40..184de72 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -444,9 +444,9 @@ namespace cxxopts std::basic_regex integer_pattern ("(-)?(0x)?([1-9a-zA-Z][0-9a-zA-Z]*)|((0x)?0)"); std::basic_regex truthy_pattern - ("t|true|T|True"); + ("(t|T)(rue)?"); std::basic_regex falsy_pattern - ("(f|false|F|False)?"); + ("((f|F)(alse)?)?"); } namespace detail @@ -1570,7 +1570,7 @@ ParseResult::consume_positional(std::string a) if (iter != m_options.end()) { auto& result = m_results[iter->second]; - if (!iter->second->value().is_container()) + if (!iter->second->value().is_container()) { if (result.count() == 0) {