C++ (Qt) QRegExp re("(arm_\\w+)( \\d+)"); QString test("arm_lo 12"); int i = re.indexIn(test); if (i >= 0) { QString corrected = test; corrected.remove(i + re.cap(1).length(), re.cap(2).length()); qDebug() << corrected; }
C++ (Qt)while(!asleep()) sheep++;