makersweb 2017.01.10 14:58 조회 수 : 4093
static QString extractNumberFromString(QString srcStr) { QString finalString; QRegExp xRegExp("(-?\d+(?:[\.,]\d+(?:e\d+)?)?)"); xRegExp.indexIn(srcStr); QStringList xList = xRegExp.capturedTexts(); foreach(finalString, xList) return finalString; }