Perfect! That works!
#include <string>
#include <iostream>
#include <iomanip>
#include <boost/xpressive/xpressive_static.hpp>
#include <boost/xpressive/regex_actions.hpp>
namespace xp = boost::xpressive;
int main()
{
using namespace xp;
placeholder<double> result;
sregex double_ = ~after(_d) >>
// a number with no group separators, and either a period or comma
// for fraction separator
(+_d)[result = as<double>(_)] >>
!((set=',','.') >> (_d >> _d)[result += as<int>(_)/100.0]) >>
~before(set[_d|','|'.'])
// A number with optional group separators
| repeat<1,3>(_d)[result = as<int>(_)] >>
(
// ... with comma group separators and period fraction separator
*(',' >> repeat<3>(_d)[result *= 1000, result += as<int>(_)]) >>
!('.' >> (_d >> _d)[result += as<int>(_)/100.0]) >>
~before(set[_d|','|'.'])
// ... with period group separators and comma fraction separator
| *('.' >> repeat<3>(_d)[result *= 1000, result += as<int>(_)]) >>
!(',' >> (_d >> _d)[result += as<int>(_)/100.0]) >>
~before(set[_d|','|'.'])
);
std::string str;
double d = 0.0;
smatch what;
what.let(result = d);
std::cout << std::fixed << std::setprecision(2);
while (std::getline(std::cin, str))
{
if (regex_search(str, what, double_))
{
std::cout << "Double = " << d << '\n';
}
else
{
std::cout << "No match\n";
}
}
}