I am using C++11 and am wondering what is the most elegant to process an existing C++ string such that it only contains these valid characters below. Efficiency is also a concern, but looking for elegance foremost.

"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\_-";

Thank you,
Virgil.