The following code is does not work. Why?
@
QRegExp *reg = new QRegExp("(?(x)y|z)"); // pattern: (?(if)then|else)
qDebug() << reg->exactMatch("xy"); // return 'false'
@
One thing you might want to try out is the regexp example. For learning a bit more of regexp and its behaviour it is quite handy.
Check on *\examples\widgets\tools\regexp for Qt5.1.0 for Qt 4 it was under *\examples\tools\regexp