PDA

View Full Version : Extract method on plaintext with QRegExp



jlbrd
2nd July 2006, 11:27
Hello,

With QRegExp, I want to extract each method names on QString returned by plaintext() method on QTextEdit, i.e. words between :: and ) but not on "" or () or {}


void class::method(myEnum::foo f)
{
QString s = QString::number(5);
}
must return method(myEnum::foo f) but not foo nor QString::number(5)

Thanks

jacek
2nd July 2006, 14:38
Maybe something like this:
"::(\\w+\\([\\w\\s:]*\\))\\s*(?:const)?\\s*\\{"