Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
filter to exclude a string pattern ?
21 views
Skip to first unread message
Nicolas G
unread,
Sep 17, 2015, 8:52:04 PM
9/17/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi, I have the bellow values written from some vars , they all have a pattern 'xyz_' on front :
xyz_name_1
xyz_name_2
xyz_special_3
xyz_other_4
Is there a filter I can use to exclude the 'xyz_' pattern so my values will be more clear like :
name_1
name_2
special_3
other_4
???
Brian Coca
unread,
Oct 23, 2015, 7:29:27 PM
10/23/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
you can use the replace filter {{var|replace('xyz_','')}}
--
Brian Coca
Reply all
Reply to author
Forward
0 new messages