QString MainWindow::GetId(QString url) { QRegExp re("^[^v]+v=(.{11}).*", Qt::CaseInsensitive); re.indexIn(url); QStringList list = re.capturedTexts(); return list.at(1); }