How to extract the string using Jinja

Hi,

I want to extract a sub string in a string like below.
From these string “xxxx xxxxxxx xxxxxxx (zzzzz)” need to extract only “zzzz” using jinja in print format.

Anyone please help me.

Thanks,
Aravind.

Hello @Racer_Aravind,

{% set list1 = variable1.split(‘(’) %}
Your Extracted string {{ list1[1] }}

@bhavikpatel7023 Thanks for your help, but I am getting a error like below

Anyone please help on this.

You are using the wrong character for quotes, use ' and not

1 Like