diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index cc7871766d60afd1b65874b0cc0c23bcded7b3be..28f57a8a1dc154edae28650f42cbd7a871a2a3e3 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -175,8 +175,8 @@
 
     \quotefromfile tutorials/alarms/AlarmDialog.qml
     \skipto contentItem
-    \printuntil "model: years"
-    \printuntil }
+    \printuntil /model\: years/
+    \printuntil /^}/
 
     If you click on \b OK in the dialog, the entered data will be
     added to \c alarmModel:
@@ -233,7 +233,7 @@
 
     \quotefromfile tutorials/alarms/AlarmDialog.qml
     \skipto contentItem
-    \printuntil "        }"
+    \printuntil /^\}/
 
     \section1 Editing alarms