C++ removing certain symbol/punctuation
<p><code>token.erase(std::remove_if(token.begin(), token.end(), ispunct), token.end());
</code>
It seems that using <code>ispunct</code> will remove all punctuation. Is it possible to only remove certain types? For example if I want to remove all punctuation except, for example colon? Or do you have to write your own condition in that case?</p>