Qt 正则只取数字 QString str = "lisjsux89";QRegExp rx("(\\d+)"); QString type; int pos = 0; while ((pos = rx.indexIn(str, pos)) != -1) { type.append(rx.cap(1)); pos += rx.matchedLength(); } qt 2024-09-01 34 点赞 0 评论 51 浏览