Is there an elegant way to remove characters from a string?
For instance, how do I get from foo123bar a string 123?
I’m aware that there are some similar questions, but my point is, that I don’t know a priori if foo or bar is present.
Cheers!
Use std::remove_if algorithm
Here is code:
output will be: