|
Boost Users : |
Subject: Re: [Boost-users] String algorithm? Removing non-alphanumerics from a string
From: Jens Weller (JensWeller_at_[hidden])
Date: 2013-10-22 07:14:28
Â
Â
> Gesendet:Â Freitag, 18. Oktober 2013 um 20:05 Uhr
> Von:Â "Tim Burgess" <tim_at_[hidden]>
> An:Â "'boost-users list'" <boost-users_at_[hidden]>
> Betreff:Â [Boost-users] String algorithm? Removing non-alphanumerics from a string
>
> Hi,
> Â
> 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 colleague told me that a could use something in the string algorithm library, but Iâm obviously not spotting what I need. I tried regex replace, but failed, as Iâm not understanding regular expressions yet.
> Â
> Any and all suggestions would be gratefully received.
> Â
> Best wishes.
> Â
> Tim Burgess
std::remove_if with a predicate?
Maybe std::isalnum would already do the job...
kind regards,
Jens Weller
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