[Interest] question about Qt Regx to match hexdecimal
nikita baryshnikov
nib952051 at gmail.com
Mon Apr 1 08:32:51 CEST 2013
QRegExp re("([0-9a-f]+)", Qt::CaseInsensitive);
Q_ASSERT(re.indexIn("12345ABC") == 0);
Q_ASSERT(re.capturedTexts()[0] == "12345ABC");
On Sat, Mar 30, 2013 at 5:07 PM, Vincent Cai <wcai at cypress.com> 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
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130401/c874f577/attachment.html>
More information about the Interest
mailing list