1#ifndef QX_REGULAREXPRESSION_H
2#define QX_REGULAREXPRESSION_H
5#include <QRegularExpression>
7using namespace Qt::Literals::StringLiterals;
16 static inline const QRegularExpression
HEX_ONLY = QRegularExpression(u
"^[a-fA-F0-9]+$"_s, QRegularExpression::CaseInsensitiveOption);
17 static inline const QRegularExpression
ANY_NON_HEX = QRegularExpression(u
"[^a-fA-F0-9 -]"_s, QRegularExpression::CaseInsensitiveOption);
18 static inline const QRegularExpression
NUMBERS_ONLY = QRegularExpression(u
"^[0-9]*$"_s, QRegularExpression::CaseInsensitiveOption);
19 static inline const QRegularExpression
ALPHANUMERIC_ONLY = QRegularExpression(u
"^[a-zA-Z0-9]*$"_s, QRegularExpression::CaseInsensitiveOption);
20 static inline const QRegularExpression
LETTERS_ONLY = QRegularExpression(u
"^[a-zA-Z]+$"_s, QRegularExpression::CaseInsensitiveOption);
22 u
"(?P<major>0|[1-9]\\d*)"_s
24 u
"(?P<minor>0|[1-9]\\d*)"_s
26 u
"(?P<patch>0|[1-9]\\d*)"_s
27 u
"(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?"_s
28 u
"(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"_s);
30 u
"(?P<major>0|[1-9]\\d*)"_s
32 u
"(?P<minor>0|[1-9]\\d*)"_s
34 u
"(?P<patch>0|[1-9]\\d*)"_s
36 u
"(?P<revision>0|[1-9]\\d*)"_s
37 u
"(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?"_s
38 u
"(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"_s);
39 static inline const QRegularExpression
LINE_BREAKS = QRegularExpression(u
"[\\r\\n\\v]"_s);
40 static inline const QRegularExpression
WHITESPACE = QRegularExpression(u
"[\\f\\n\\r\\t\\v\x20\xA0\x00A0\u2028\u2029]"_s);
The RegularExpression class is a collection of convenient regular expression statements.
Definition qx-regularexpression.h:13
static const QRegularExpression LINE_BREAKS
Definition qx-regularexpression.h:39
static const QRegularExpression WHITESPACE
Definition qx-regularexpression.h:40
static const QRegularExpression LETTERS_ONLY
Definition qx-regularexpression.h:20
static const QRegularExpression ALPHANUMERIC_ONLY
Definition qx-regularexpression.h:19
static const QRegularExpression HEX_ONLY
Definition qx-regularexpression.h:16
static const QRegularExpression SEMANTIC_VERSION
Definition qx-regularexpression.h:21
static const QRegularExpression ANY_NON_HEX
Definition qx-regularexpression.h:17
static const QRegularExpression LONG_SEMANTIC_VERSION
Definition qx-regularexpression.h:29
static const QRegularExpression NUMBERS_ONLY
Definition qx-regularexpression.h:18
The Qx namespace is the main namespace through which all non-global functionality of the Qx library i...
Definition qx-abstracterror.cpp:13