summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qregularexpression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qregularexpression.cpp')
-rw-r--r--src/corelib/tools/qregularexpression.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index 1bd06a73cd..6f0e572f41 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
@@ -483,6 +483,11 @@ QT_BEGIN_NAMESPACE
Note the usage of the non-capturing group in order to preserve the meaning
of the branch operator inside the pattern.
+ The QRegularExpression::anchoredPattern() helper method does exactly that for
+ you.
+
+ \sa anchoredPattern
+
\section3 Porting from QRegExp's Partial Matching
When using QRegExp::exactMatch(), if an exact match was not found, one
@@ -1995,6 +2000,17 @@ QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
}
/*!
+ \fn QRegularExpression::anchoredPattern(const QString &expression)
+
+ \since 5.12
+
+ Returns the expression wrapped between the \c{\A} and \c{\z} anchors to be
+ used for exact matching.
+
+ \sa {Porting from QRegExp's Exact Matching}
+*/
+
+/*!
\since 5.1
Constructs a valid, empty QRegularExpressionMatch object. The regular