Thanks, this is my final working code ( i hope! )\:
// str contains the string to match
regex.setMinimal(true);
int pos = 0;
while ((pos = regex.indexIn(str, pos)) != -1)
{
list << regex.
cap(0).
remove(QChar('@'),Qt
::CaseInsensitive);
pos += regex.matchedLength();
}
return list;
// str contains the string to match
QRegExp regex("@.*@");
regex.setMinimal(true);
QStringList list;
int pos = 0;
while ((pos = regex.indexIn(str, pos)) != -1)
{
list << regex.cap(0).remove(QChar('@'),Qt::CaseInsensitive);
pos += regex.matchedLength();
}
return list;
To copy to clipboard, switch view to plain text mode
Bookmarks