diff --git a/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst b/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst
index 158f8d15066b48024499744659507461f00897eb..10340bed6864a1610b2c5ea047dec315c1fdb0e4 100644
--- a/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst
+++ b/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst
@@ -488,23 +488,27 @@ Output:
 
 .. testcode:: ExGroupDetectorsWithPattern
 
-   # Create Workspace of 5 spectra each with two entries.
-   ws = CreateWorkspace(DataX=[1,2], DataY=[11,12,21,22,31,32,41,42,51,52], NSpec=5)
+   # Create Workspace of 10 spectra each with one bin.
+   ws = CreateWorkspace(DataX=[1], DataY=[1,2,3,4,5,6,7,8,9,10], NSpec=10)
 
-   # Run algorithm adding first two spectra and then keeping last two spectra
-   ws2 = GroupDetectors(ws, GroupingPattern="0+1,3,4")
+   # Run algorithm adding first two spectra and then keep the fifth, and last three spectra
+   ws2 = GroupDetectors(ws, GroupingPattern="0+1,4,7:9")
 
    #print result
    print ws2.readY(0)
    print ws2.readY(1)
    print ws2.readY(2)
+   print ws2.readY(3)
+   print ws2.readY(4)
 
 Output:
 
 .. testoutput:: ExGroupDetectorsWithPattern
 
-   [ 32.  34.]
-   [ 41.  42.]
-   [ 51.  52.]
+   [ 3.]
+   [ 5.]
+   [ 8.]
+   [ 9.]
+   [ 10.]
 
 .. categories::