|
Boost Users : |
Subject: Re: [Boost-users] String algorithm? Removing non-alphanumerics from a string
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-10-19 07:03:27
On 10/18/2013 08:05 PM, Tim Burgess wrote:
> Takeing an std::string as input, I need to return the same string with
> any characters not in the ranges az, AZ and 09 being discarded. A
#include <boost/regex.hpp>
#include <boost/algorithm/string/regex.hpp>
// ...
boost::regex non_alnum("[^[:alnum:]]");
boost::algorithm::erase_all_regex(input, non_alnum);
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net