47 #include <QtCore/qstring.h> 71 enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
79 #ifdef Q_COMPILER_RVALUE_REFS 91 void setPattern(
const QString &pattern);
95 inline QT3_SUPPORT
bool caseSensitive()
const {
return caseSensitivity() ==
Qt::CaseSensitive; }
96 inline QT3_SUPPORT
void setCaseSensitive(
bool sensitive)
102 inline QT3_SUPPORT
bool wildcard()
const {
return patternSyntax() == Wildcard; }
103 inline QT3_SUPPORT
void setWildcard(
bool aWildcard)
104 { setPatternSyntax(aWildcard ? Wildcard : RegExp); }
107 bool isMinimal()
const;
108 void setMinimal(
bool minimal);
110 inline QT3_SUPPORT
bool minimal()
const {
return isMinimal(); }
113 bool exactMatch(
const QString &str)
const;
115 int indexIn(
const QString &str,
int offset = 0,
CaretMode caretMode = CaretAtZero)
const;
116 int lastIndexIn(
const QString &str,
int offset = -1,
CaretMode caretMode = CaretAtZero)
const;
118 inline QT3_SUPPORT
int search(
const QString &str,
int from = 0,
120 {
return indexIn(str, from, caretMode); }
121 inline QT3_SUPPORT
int searchRev(
const QString &str,
int from = -1,
123 {
return lastIndexIn(str, from, caretMode); }
125 int matchedLength()
const;
126 #ifndef QT_NO_REGEXP_CAPTURE 130 int captureCount()
const;
133 QString cap(
int nth = 0)
const;
135 int pos(
int nth = 0)
const;
136 int pos(
int nth = 0);
144 inline QT3_SUPPORT_CONSTRUCTOR
QRegExp(
const QString &aPattern,
bool cs,
bool aWildcard =
false)
148 aWildcard ? Wildcard : RegExp);
158 #ifndef QT_NO_DATASTREAM 167 #endif // QT_NO_REGEXP #define QT_END_NAMESPACE
This macro expands to.
The QRegExp class provides pattern matching using regular expressions.
The QString class provides a Unicode character string.
Q_GUI_EXPORT QString errorString(EGLint code=eglGetError())
Q_DECLARE_TYPEINFO(QRegExp, Q_MOVABLE_TYPE)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool isEmpty(const char *str)
The QStringList class provides a list of strings.
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &in, QRegExp ®Exp)
void qSwap(T &value1, T &value2)
Q_GUI_EXPORT QString escape(const QString &plain)
Converts the plain text string plain to a HTML string with HTML metacharacters <, >...
void swap(QRegExp &other)
Swaps regular expression other with this regular expression.
PatternSyntax
The syntax used to interpret the meaning of the pattern.
Q_CORE_EXPORT QDataStream & operator<<(QDataStream &out, const QRegExp ®Exp)
bool operator!=(const QRegExp &rx) const
Returns true if this regular expression is not equal to rx; otherwise returns false.
CaretMode
The CaretMode enum defines the different meanings of the caret (^) in a regular expression.
The QDataStream class provides serialization of binary data to a QIODevice.
bool operator==(QBool b1, bool b2)