Hi,
I would like to take last two character of a string using jinja2 after i
have trim a string.even though i have successfully trimmed a file, so
couldn't take last two number
example on sample string:
test-asdz01
{%- set x = salt['grains.get']('id', '').split('-') %}
{%- if (x is not none) %}
{%- set x = y %}
{% endif %}
When i execute this, it returns "asdz01". So if i use the last builting
after split that i am getting just "1"
Anyway to get last two number here ?
Thanks
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.