I have an process that outputs lines like that:
0,0,1 some blah
0,1,0 some blah
1,0,1 some blah
2,0,1 some blah

I want to grab the first numeric part, this is how I do it:
Qt Code:
  1. QString result = cdscanbus.readAllStandardOutput();
  2. qDebug()<< result;
  3. QRegExp rx("[0-9],[0-9],[0-9]");
  4. int pos = rx.indexIn(result);
  5. if(pos > -1){
  6. QString value = rx.cap(0);
  7. qDebug()<< value;
  8. }
To copy to clipboard, switch view to plain text mode 

the problem is that qDebug only returns the first 0,0,0 expression.
any idea how to make it return all occurence of [0-9],[0-9],[0-9] ?
thanx in advance

Pat