I have defined a regular expression for double quotes i.e whatever comes in "" gets some format..using qtextcharformat..and one expression for operator +.. like
Qt Code:
  1. QRegExp rx1("\".*\"");
  2. QRegExp rx2("\\+");
  3. rx1.setForeground((QColor::red));
  4. rx2.setForeground((QColor::orange));
To copy to clipboard, switch view to plain text mode 

The problem i am facing is that if i type + inside double quotes, it doesn't get the format i defined for "" i.e it retains its orange color instead should be red only as written inside "". Can anyone suggest me what wrong I am doing?