makersweb 2017.01.10 14:58 조회 수 : 3265
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; }