Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
hi all, I needed to capture the text inside a parentheses. For eg: hello how are u mr(abc+d) joy
here i want to capture the text "abc+d" how can i do that? i tried but i didnt get how to use parentheses.... please some one guide me
You will have to escape the parentheses using \. @ QString text("hello how are u mr(abc+d) joy");
QRegExp exp("\\((.*)\\)"); if(exp.indexIn(text) >= 0) { qDebug() << exp.cap(0); // "(acb+d)" qDebug() << exp.cap(1); // "abc+d" }
@