Minor regex fixes for VC6 (Added some boost:: qualifies to work around lack or Koenig lookup).

[SVN r8238]
This commit is contained in:
John Maddock
2000-11-17 11:35:02 +00:00
parent 36e4289aaa
commit c0399a3a57
8 changed files with 19 additions and 12 deletions

View File

@ -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;
}