QRegExp rx("\([0-9]+\)"); QString = "(23) P ((1) @)"; int pos = 0; while ((pos = rx.indexIn(str, pos)) != -1) { list << rx.cap(1); pos += rx.matchedLength(); }
QRegExp rx("\([0-9]+\)"); QString str = "(23) P ((1) @)"; int pos = 0; while ((pos = rx.indexIn(str, pos)) != -1) { //list << rx.cap(1); qDebug() << rx.cap(1); pos += rx.matchedLength(); }
16,814
社区成员
26,685
社区内容
加载中
试试用AI创作助手写篇文章吧