0

how to remove characters other than a letter or a space?

how can i define the following: if string [x] is different from any letter or string in [x] it is different from a space. I want to define this to eliminate everything that is not letters or spaces in a sentence

5th Apr 2020, 1:21 AM
jhon sebastian zuñiga lopez
jhon sebastian zuñiga lopez - avatar
4 RĂ©ponses
+ 2
Sorry about that, I added some reference links within the code. Check out the links to understand it better 👍
5th Apr 2020, 10:21 AM
Ipang
+ 1
You can use `remove_if` function from <algorithm> library. Here is an example for removing non alphabet and whitespace from string. https://code.sololearn.com/c91bp5yqw3XW/?ref=app
5th Apr 2020, 2:21 AM
Ipang
+ 1
thanks the code does what I need, but I don't understand what process is running on each line
5th Apr 2020, 5:31 AM
jhon sebastian zuñiga lopez
jhon sebastian zuñiga lopez - avatar
+ 1
Ok, thanks
5th Apr 2020, 10:27 AM
jhon sebastian zuñiga lopez
jhon sebastian zuñiga lopez - avatar