Unsolved QRegularExpression question.
-
the top half code shows match value is 0.
But the bottom half code shows hasMatch value is 1,seems QRegExp class exactMatch() match completely, but QRegularExpression class match partially.Any body knows how to make QRegularExpression do completely match?
-
Hi @samzhcs1,
Any body knows how to make QRegularExpression do completely match?
As per Exact Matching, you simply ensure your expression begins with
^
and ends with$
.In your examples above, you have the starting
^
already, but not the finishing$
anchor.Cheers.