Reputation: 16349
I'm using regex to test if iptables have been set. Here is a stripped down version of what trying to achieve.
QRegExp rx_preroute(".*DNAT\s*udp\s*--\s*anywhere\s*192\.168\.13\.115\s*to:10\.5\.110\.123:7891.*");
QString out = "DNAT udp -- anywhere 192.168.13.115 to:10.5.110.123:7891";
qDebug() << rx_preroute.exactMatch(out);
//prints out false
However, if I do the same thing in the regex checker (http://regexpal.com/ ) it passes. Also it seem to me, by manually checking the pattern, that it should pass. Qt is running on the default regex syntax. I experience the same behavior with setPatternSyntax(QRegExp::RegExp2)
.
Upvotes: 0
Views: 530