Is there an easier way to simply remove or filter out all non-alphabetical characters in C++?
I am loading in a file to sort each word into a dictionary and I want the dictionary to only contain single whole words, no spaces and no-non alphabetical characters.
//Read the entire file (stream) into QString variable "file"
QString file = in.readAll();
QStringList NewList = file.split(QRegExp("[\\s\\,\\!\\?\\...\\;\\:\\-\\[\\]\\{\\}\\+\\-\\=\\_\\<\\>\\]QString::SkipEmptyParts);
This method does work however its very un-efficient to simply list all of the non-alphabetical characters.
Can somebody show me a quicker method for doing this?
I am certain this is not the best way...