[SOLVED] Need help with regular expression
-
Hello everybody!
Can somebody please help me with regular expression for QRegExp? I just hate them :(I need to get from strings simple numeric strings:
7.5.5468 dev -> 755468
7.5.5468 pre -> 755468
7.6 -> 76
7.6 pre -> 76
7.7 beta1 -> 77 (without 1 on the end)Thank you in advance!
-
have done this without regexp.
@
long chk_version(QString ver)
{
return ver.contains(' ')?ver.left(ver.indexOf(' ')).remove('.').toLong():ver.remove('.').toLong();
}
@