Hi, how would I remove all carriage returns , tabs, line feeds ect from a QString. I just want all character and number data.
[quote author="Andre" date="1314563158"]One way would be to use QString::replace(), use a QRegExp to find the characters/character sequences you mention, and replace them with "".[/quote]
"QString::remove()":http://doc.qt.nokia.com/4.7-snapshot/qstring.html#remove would be equivalent, too. You also might consider the possibility of using "QString::simplified()":http://doc.qt.nokia.com/4.7-snapshot/qstring.html#simplified to cull out a lot of extraneous white space first, if it would help in building your QRegExp.
Senior Software Engineer
AccuWeather Enterprise Solutions
/* My views and opinions do not necessarily reflect those of my employer. Void where pro...