The RegularExpression class is a collection of convenient regular expression statements.
#include <qx/core/qx-regularexpression.h>
◆ ALPHANUMERIC_ONLY
Matches text that only contains Latin letters and numeric characters.
◆ ANY_NON_HEX
Matches text that contains at least a single non-hexadecimal character.
◆ HEX_ONLY
Matches text that only contains valid hexadecimal characters (case-insensitive).
◆ LETTERS_ONLY
Matches text that only contains Latin letters.
◆ LINE_BREAKS
Matches any line break character.
◆ LONG_SEMANTIC_VERSION
Initial value:
u"(?P<major>0|[1-9]\\d*)"_s
u"\\."_s
u"(?P<minor>0|[1-9]\\d*)"_s
u"\\."_s
u"(?P<patch>0|[1-9]\\d*)"_s
u"\\."_s
u"(?P<revision>0|[1-9]\\d*)"_s
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
u"(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"_s)
Same as SEMANTIC_VERSION except that 4 digits are expected instead of 3, with the fourth digit corresponding to the additional capture group 'revision'.
◆ NUMBERS_ONLY
Matches text that only contains numeric characters.
◆ SEMANTIC_VERSION
Initial value:
u"(?P<major>0|[1-9]\\d*)"_s
u"\\."_s
u"(?P<minor>0|[1-9]\\d*)"_s
u"\\."_s
u"(?P<patch>0|[1-9]\\d*)"_s
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
u"(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"_s)
Matches text that denotes a semantic version in accordance with the Semantic Version 2.0.0 specification.
The resulting match is valid for VersionNumber::fromString().
Provides the following capture groups:
- major
- minor
- patch
- prerelease
- buildmetadata
- Note
- Unlike the officially recommended regular expression, this one does not use
^
or $
so that the semantic version section of a larger string may be matched.
- See also
- VersionNumber.
◆ WHITESPACE
Matches any whitespace character. Specifically:
\f
\n
\r
\t
\v
\x20
\xA0
\u00A0
\u2028
\u2029
The documentation for this class was generated from the following files: