I would like to capture the string that is between 2 occurrences of word SAT
and does not contain SAT
. I have found this so far, which is not working
QLatin1String(".*SAT([^(SAT)]*)SAT.*")
I am afraid that [^(SAT)]*
is not doing what i want, that is finding a string with not the word SAT
. Or maybe the way i do the capture is not good:
QRegExp rx(pat);
int p = 0;
QString cap = QString::null;
if((p = rx.indexIn(str, p)) != -1)
cap = rx.cap(1).trimmed();