clarify the slicing example (#36842) (#36847)

As stated by fellow contributors, update the slicing example

Resolves:
Related: #36625
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
(cherry picked from commit 8362ddd107)
pull/36860/head
John R Barker 7 years ago committed by GitHub
parent d4252c89e9
commit f14e0e7ee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 '~'::

Loading…
Cancel
Save