I tried this code rule.pattern = QRegExp("\\b+(?=\\()"); but its not working...can someone provide me code for matching Operators and symbols?