From f14e0e7ee31a38b28166f90448a28bd71a506928 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Wed, 28 Feb 2018 13:31:33 +0000 Subject: [PATCH] clarify the slicing example (#36842) (#36847) As stated by fellow contributors, update the slicing example Resolves: Related: #36625 Signed-off-by: Daniel Andrei Minca (cherry picked from commit 8362ddd107958eb245ea08e6d41ca5835636e5da) --- docs/docsite/rst/user_guide/intro_patterns.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/user_guide/intro_patterns.rst b/docs/docsite/rst/user_guide/intro_patterns.rst index 1a4155fd87d..3dca1a4bf5d 100644 --- a/docs/docsite/rst/user_guide/intro_patterns.rst +++ b/docs/docsite/rst/user_guide/intro_patterns.rst @@ -81,9 +81,10 @@ You can refer to hosts within the group by adding a subscript to the group name: webservers[0] # == cobweb webservers[-1] # == weber - webservers[0:1] # == webservers[0],webservers[1] + webservers[0:2] # == webservers[0],webservers[1] # == cobweb,webbing webservers[1:] # == webbing,weber + webservers[:3] # == cobweb,webbing,weber Most people don't specify patterns as regular expressions, but you can. Just start the pattern with a '~'::