Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Called on an invalid QRegularExpression object warning
samzhcs1 last edited by A Former User
QRegularExpressionMatch mat = re2.match(tst);
The above code generated called on an invalid QRegularExpression object warning, while the following code works well.
QRegularExpressionMatch mat = re3.match(tst);
But I tried with :
bool match = rx.exactMatch(tst);
then it works well.
Anybody know the reason?
Your first star is the problem.
What exactly are you trying to search ?
samzhcs1 last edited by samzhcs1
should be this expression, don't know why when I posted it, browser seems removed some backslashes
Still your first * is the problem. Hence my question, what do you want to extract exactly with your expression ?
I want to match the following string:
Number, 1 2 3 ..
and A1 b3 C3 ..M19 ..
formula: =A1+B1 / c3 ...
@SGaist then how can I put a Arithmetic operator * in the expression?
You can use the regular expression tool from Qt's example to test your regular expressions with Qt.
It's the \ escaped character reason.