boost::regex is much more rhobust against oddities in strings than the previous hand-written parsing.