+ // Check according to specified rule
+ QRegExp rx;
+ if (rule.isRegEx) {
+ rx = QRegExp(rule.name,
+ rule.isCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
+ } else {
+ rx = QRegExp("(^|\\W)" + QRegExp::escape(rule.name) + "(\\W|$)",
+ rule.isCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
+ }
+ nameMatch = (rx.indexIn(stripFormatCodes(msgContents)) >= 0);