http://www.boost.org/doc/libs/1_52_0/libs/regex/doc/html/boost_regex/introduction_and_overview.html gives example of matching. You end up with a match_results
structure which you can get the matches from.
Untested code
const char *str = "123 12 E";
boost::regex re ("^(\\d{1,3}) (\\d{1,2}) ([NSEW])$");
boost::cmatch mr;
if (boost::regex_match ( str, mr, re )) {
std::cout << "There were: " << mr.size () - 1 << " fields matched" << std::endl;
std::cout << "First part: " << mr[1] << std::endl;
}