Fix documentation of QRegExp

Change-Id: I6c9083941eb791eb34ce982986e3e04ac5a765ad
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
jkobus 2014-04-14 13:17:12 +02:00 committed by The Qt Project
parent 571c16555b
commit 38aba919ac
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ QRegExp mark("\\b" // word boundary
QRegExp rx("^\\d\\d?$"); // match integers 0 to 99
rx.indexIn("123"); // returns -1 (no match)
rx.indexIn("-6"); // returns -1 (no match)
rx.indexIn("6"); // returns 0 (matched as position 0)
rx.indexIn("6"); // returns 0 (matched at position 0)
//! [4]

View File

@ -388,7 +388,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from,
Note: Quantifiers are normally "greedy". They always match as much
text as they can. For example, \b{0+} matches the first zero it
finds and all the consecutive zeros after the first zero. Applied
to '20005', it matches'2\underline{000}5'. Quantifiers can be made
to '20005', it matches '2\underline{000}5'. Quantifiers can be made
non-greedy, see setMinimal().
\target capturing parentheses
@ -678,7 +678,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from,
QRegExp can match case insensitively using setCaseSensitivity(),
and can use non-greedy matching, see setMinimal(). By
default QRegExp uses full regexps but this can be changed with
setWildcard(). Searching can be forward with indexIn() or backward
setPatternSyntax(). Searching can be done forward with indexIn() or backward
with lastIndexIn(). Captured text can be accessed using
capturedTexts() which returns a string list of all captured
strings, or using cap() which returns the captured string for the