QString str = QString::fromLocal8Bit("adsfasdf18012341234asdf13063083333asdfasf"); QRegExp rx("1\\d{10}"); // int pos = 0; while ((pos = rx.indexIn(str,pos)) != -1) { qDebug()<<rx.cap(0); pos += rx.matchedLength(); }原文链接:https://www.f2er.com/regex/359038.html