diff options
Diffstat (limited to 'src/corelib/tools/qregexp.cpp')
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 678f3d22c0..bfdcc338c6 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -424,7 +424,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from, For historical reasons, quantifiers (e.g. \bold{*}) that apply to capturing parentheses are more "greedy" than other quantifiers. - For example, \bold{a*(a)*} will match "aaa" with cap(1) == "aaa". + For example, \bold{a*(a*)} will match "aaa" with cap(1) == "aaa". This behavior is different from what other regexp engines do (notably, Perl). To obtain a more intuitive capturing behavior, specify QRegExp::RegExp2 to the QRegExp constructor or call |