Boost logo

Boost :

From: Javier Estrada (JEstrada_at_[hidden])
Date: 2006-12-19 12:58:54


I believe the function validate_card_format should take a const
std::string& instead of a const std::string
http://www.boost.org/libs/regex/doc/introduction.html

bool validate_card_format(const std::string s)
{
   static const boost::regex e("(\\d{4}[- ]){3}\\d{4}");
   return regex_match(s, e);
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk