PDA

View Full Version : QRegExp Help



Ahmad
28th May 2007, 00:22
Hi everyone,
i need some help in QRegExp;
in fact i have a file that i read in a QTextStream
the file format is like this;

login;passwor;status;surname;name
login;passwor;status;surname;name
login;passwor;status;surname;name
login;passwor;status;surname;name

i read every line till the end of file in a string str with my textstream ts;
and i want to put everypart of my string that are separated by commas in different string variables for some test..
i wanna know if it is good to use a QRegExp or try another simple methode, cause my file format is not very complicate for using a QRegExp..

i need ur advises and if ur kind, a simple example...
:o

wysota
28th May 2007, 00:46
Try QString::split().

Ahmad
28th May 2007, 01:13
tnx, it was really simpler than what i thinked, tnx a lot