help me to understand my regular expression error AND solve it
C / C++ / MFC
1
Posts
1
Posters
7
Views
1
Watching
-
since I am not allowed to post instructions ... the attached code correctly "matches " (highlighted )pair - BOTH items:
QRegularExpression re("hci[0-9]+\t[0-9A-F:]+");
in this text : Devices: hci1 00:15:83:15:A2:CB hci0 00:50:B6:80:4D:5D however this regular expression FAILS to match (highlighted ) "pair"
QRegularExpression re("([0-F]{2}[:]){5}[0-F]{2}+solo");
Scanning ... 00:50:B6:80:4D:5D nov251-desktop ED:C3:50:CA:6D:29 OontZ Angle solo D29 the difference is in sequence of matches (text address / address text ) and I just do not see my error. If I expand the text to full OontZ Angle solo D29 I get this ED:C3:50:CA:6D:29 A D29 Then my regular expression is plain wrong !