한국어
Qt


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;                                  
}