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:

Qt Code:
  1. QString str ="My name is @Pinco Pallino@ and your name is @Panco Pallone@";
  2. QRegExp regex("@*@");
  3. regex.setPatternSyntax(QRegExp::Wildcard);
  4. regex.indexIn(str);
  5.  
  6. QStringList list = regex.capturedTexts();
To copy to clipboard, switch view to plain text mode 

the result is: "@Pinco Pallino@ and your name is @Panco Pallone@"...Instead I want:

@Pinco Pallino@
@Panco Pallone@