summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-09-06 17:52:05 +0100
committerQt by Nokia <qt-info@nokia.com>2012-09-07 15:39:31 +0200
commit4bf55f979f5a7f9af0edcf601a099def6b218050 (patch)
treeb1e3509ac3094964d0658dbc3e87a1ce158a66af /src
parent946317711f21a3bd30921206427716d749bf8368 (diff)
Fix QRegularExpression* docs
A couple of runaway backslashes resulted in illegal code in the examples. Change-Id: Ib00d4e1d792e44bb73dafdd84c3a1843dcb34e27 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp
index cab89d9c9e..2a40629dcb 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qregularexpression.cpp
@@ -267,7 +267,7 @@ for (int i = 0; i <= match.lastCapturedIndex(); ++i) {
//! [28]
//! [29]
-QRegularExpression("(\d\d) (?<name>\w+)");
+QRegularExpression("(\\d\\d) (?<name>\\w+)");
QRegularExpressionMatch match = re.match("23 Jordan");
if (match.hasMatch()) {
QString number = match.captured(1); // first == "23"
@@ -277,7 +277,7 @@ if (match.hasMatch()) {
//! [30]
// extracts the words
-QRegularExpression re("(\w+)");
+QRegularExpression re("(\\w+)");
QString subject("the quick fox");
QRegularExpressionMatchIterator i = re.globalMatch(subject);
while (i.hasNext()) {