paolom
9th July 2010, 11:29
if I have:
"My name is @Pinco Pallino@ and your name is @Panco Pallone@..."
I want to extract 'Pinco Pallino' and 'Panco Pallone'
I think that is possible with the regular expression QRegExp ...how can I do this???
P.S. I could have: " @Pinco Pallino@ is my name ... " (it could be n match words between @ )
Thanks
P.S. 2 : I've try with:
QString str ="My name is @Pinco Pallino@ and your name is @Panco Pallone@";
QRegExp regex("@*@");
regex.setPatternSyntax(QRegExp::Wildcard);
regex.indexIn(str);
QStringList list = regex.capturedTexts();
the result is: "@Pinco Pallino@ and your name is @Panco Pallone@"...Instead I want:
@Pinco Pallino@
@Panco Pallone@
"My name is @Pinco Pallino@ and your name is @Panco Pallone@..."
I want to extract 'Pinco Pallino' and 'Panco Pallone'
I think that is possible with the regular expression QRegExp ...how can I do this???
P.S. I could have: " @Pinco Pallino@ is my name ... " (it could be n match words between @ )
Thanks
P.S. 2 : I've try with:
QString str ="My name is @Pinco Pallino@ and your name is @Panco Pallone@";
QRegExp regex("@*@");
regex.setPatternSyntax(QRegExp::Wildcard);
regex.indexIn(str);
QStringList list = regex.capturedTexts();
the result is: "@Pinco Pallino@ and your name is @Panco Pallone@"...Instead I want:
@Pinco Pallino@
@Panco Pallone@