1 #ifndef TTKREGULAREXPRESSION_H
2 #define TTKREGULAREXPRESSION_H
23 #if TTK_QT_VERSION_CHECK(5,0,0)
24 # include <QRegularExpression>
37 NoPatternOption = 0x0000,
38 CaseInsensitiveOption = 0x0001,
39 InvertedGreedinessOption = 0x0010,
51 QString pattern()
const;
55 void setPattern(
const QString &v);
60 int patternOptions()
const;
64 void setPatternOptions(
const int option);
70 bool hasMatch(
const QString &str);
75 int match(
const QString &str,
int pos = 0);
80 QString captured(
int index)
const;
85 int capturedLength()
const;
91 bool isGreediness()
const;
96 void setGreediness(
bool v);
101 bool isCaseSensitivity()
const;
106 void setCaseSensitivity(
bool v);
112 static QString escape(
const QString &str);
114 #if TTK_QT_VERSION_CHECK(5,0,0)
115 const QRegularExpression &value()
const;
116 operator QRegularExpression &();
117 operator const QRegularExpression &()
const;
119 QRegularExpression m_regular;
120 QRegularExpressionMatch m_match;
122 const QRegExp &value()
const;
123 operator QRegExp &();
124 operator const QRegExp &()
const;
131 #endif // TTKREGULAREXPRESSION_H
#define TTK_MODULE_EXPORT
The class of the regular expression.