Merge pull request #6 from wichtounet/alnum_options
Add support for alphanumeric options
This commit is contained in:
commit
1124d00de5
@ -497,10 +497,10 @@ namespace cxxopts
|
|||||||
constexpr int OPTION_DESC_GAP = 2;
|
constexpr int OPTION_DESC_GAP = 2;
|
||||||
|
|
||||||
std::basic_regex<char> option_matcher
|
std::basic_regex<char> option_matcher
|
||||||
("--([[:alpha:]][-_[:alpha:]]+)(=(.*))?|-([a-zA-Z]+)");
|
("--([[:alnum:]][-_[:alnum:]]+)(=(.*))?|-([a-zA-Z]+)");
|
||||||
|
|
||||||
std::basic_regex<char> option_specifier
|
std::basic_regex<char> option_specifier
|
||||||
("(([a-zA-Z]),)?([a-zA-Z][-_a-zA-Z]+)");
|
("(([a-zA-Z]),)?([a-zA-Z0-9][-_a-zA-Z0-9]+)");
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
format_option
|
format_option
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user