How to search the repeat pattern with QRegExp and get the separate result?



  • when I search a group of data, 0,1,2,3,4 for example, I use ( [0-9],){3} as the reg-expression. I think the result will be "0","1","2","3", but in fact, the result given by QRegExp is cap(0)="0,1,2,3,", cap(1)="3", the middle matches are missing.

    and because of that I have to use the most stupid way ( [0-9],)( [0-9,)... to fulfill my requirement.
    So, any smart way to do it?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.