diff --git a/shared/looqsquery.cpp b/shared/looqsquery.cpp index 3789054..4eb7cec 100644 --- a/shared/looqsquery.cpp +++ b/shared/looqsquery.cpp @@ -181,8 +181,8 @@ LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, b QStringList loneWords; LooqsQuery result; QRegularExpression rx( - "((?(\\.|\\w)+):(?\\((?[^\\)]+)\\)|([\\p{L},])+)|(?AND|OR)" - "|(?!)|(?\\(|\\))|(?[\"\\p{L}]+))"); + "((?(\\.|\\w)+):(?\\((?[^\\)]+)\\)|([\\p{L}\\p{N},])+)|(?AND|OR)" + "|(?!)|(?\\(|\\))|(?[\"\\p{L}\\p{N}]+))"); QRegularExpressionMatchIterator i = rx.globalMatch(expression); auto previousWasBool = [&result] { return !result.tokens.empty() && ((result.tokens.last().type & BOOL) == BOOL); }; auto previousWas = [&result](TokenType t) { return !result.tokens.empty() && (result.tokens.last().type == t); };