This works for me (Qt 4.8.3):
QRegExp re("([0-9a-fA-F]+)");
assert(re.indexIn("12345ABC") == 0);
assert(re.capturedTexts()[0] == "12345ABC");
On 3/30/2013 9:07 AM, Vincent Cai wrote:
>
> Dear all,
>
>
>
> I tried to create a Qt Regx to match hexdecimal, below is the
> strings I have tried, but all failed.
>
> l "([0-9a-fA-F]+)"
>
> l "([A-Fa-f0-9]+)"
>
> l "([\\dA-Fa-f]+)"
>
>
>
> The symptom is only 0-9 is returned, for example:
>
> 12345ABC -> 12345
>
> 12AB34EF -> 12
>
>
>
> Hope you can help!
>
> Thanks,
>
> Vincent.
>
> This message and any attachments may contain Cypress (or its subsidiaries)
> confidential information. If it has been received in error, please advise
> the sender and immediately delete this message.
>
>
> _______________________________________________
> Interest mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest