diff --git a/CHANGELOG.md b/CHANGELOG.md index bcb2a256..fb0b103f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp ### Fixed - Fix duplicated maps writing the wrong name. - Fix small maps being difficult to see while resizing. +- Fix expressions using the prefix '0X' as opposed to '0x' not being recognized has hex numbers. ## [6.0.0] - 2025-05-26 ### Breaking Changes diff --git a/src/core/parseutil.cpp b/src/core/parseutil.cpp index 27dc8c0d..4dfb06da 100644 --- a/src/core/parseutil.cpp +++ b/src/core/parseutil.cpp @@ -185,7 +185,7 @@ QList ParseUtil::tokenizeExpression(QString expression) { QList tokens; static const QStringList tokenTypes = {"hex", "decimal", "identifier", "operator", "leftparen", "rightparen"}; - static const QRegularExpression re("^(?0x[0-9a-fA-F]+)|(?[0-9]+)|(?[a-zA-Z_0-9]+)|(?[+\\-*\\/<>|^%]+)|(?\\()|(?\\))"); + static const QRegularExpression re("^(?0[xX][0-9a-fA-F]+)|(?\\d+)|(?\\w+)|(?[+\\-*\\/<>|^%]+)|(?\\()|(?\\))"); expression = expression.trimmed(); while (!expression.isEmpty()) {