I'm trying to match strings which look either like this:
7;7;52*8
8;8;62*5
9;9;55*1
11;7;52*49
12;8;62*64
14;9;54*62
or like this:
7;7;52
8;8;62
9;9;55
11;7;52
12;8;62
14;9;54
I'm using the following code.
QRegularExpression re("(^\\d+;\\d+;\\d\\d$)|(^\\d+;\\d+;\\d\\d\\*\\d+$)");
QRegularExpressionMatch match;
matching the first part is working, but the second one seems to break at the asterisk part.
The following code is working for the regex search in notepad++
(^\d+;\d+;\d\d$)|(^\d+;\d+;\d\d\*\d+$)
Is there some special way to escape the asterisk character?