mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 03:57:27 +02:00
Minor regex fixes for VC6 (Added some boost:: qualifies to work around lack or Koenig lookup).
[SVN r8238]
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
bool validate_card_format(const std::string& s)
|
||||
{
|
||||
static const boost::regex e("(\\d{4}[- ]){3}\\d{4}");
|
||||
return regex_match(s, e);
|
||||
return boost::regex_match(s, e);
|
||||
}
|
||||
|
||||
const boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
|
||||
@ -14,12 +14,12 @@ const std::string human_format("\\1-\\2-\\3-\\4");
|
||||
|
||||
std::string machine_readable_card_number(const std::string& s)
|
||||
{
|
||||
return regex_merge(s, e, machine_format, boost::match_default | boost::format_sed);
|
||||
return boost::regex_merge(s, e, machine_format, boost::match_default | boost::format_sed);
|
||||
}
|
||||
|
||||
std::string human_readable_card_number(const std::string& s)
|
||||
{
|
||||
return regex_merge(s, e, human_format, boost::match_default | boost::format_sed);
|
||||
return boost::regex_merge(s, e, human_format, boost::match_default | boost::format_sed);
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
@ -43,3 +43,4 @@ int main()
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user