doubando Super Contributor.
Super Contributor.
161 views

Grep Text from a Variable String

Jump to solution

Dears

 

i want to Grep some text string from Flow local variable using other variable !

 

for example  

 

Var_String="11.00.05 - Package Name=HPUX_005

                          11.00.06 - Package Name=HPSOL_006"

 

Var_Grep="11.00.05"

 

my target is to Grep the line from the first variable ${Var_String} using the Second variable ${Var_Grep}

 

may i get help on this

 

Labels (1)
0 Likes
1 Solution

Accepted Solutions
GeorgeDK Absent Member.
Absent Member.

Re: Grep Text from a Variable String

Jump to solution

Hello,

 

You could try using  a regular expression filter or a scriptlet. Both are available in the Results section of the "Set Local Variable" operation.

 

Please let me know if you require further clarifications.

 

Kind regards,

 

George.

 

George Daflidis-Kotsis

SW Support Technical Consultant

0 Likes
3 Replies
GeorgeDK Absent Member.
Absent Member.

Re: Grep Text from a Variable String

Jump to solution

Hello,

 

You could try using  a regular expression filter or a scriptlet. Both are available in the Results section of the "Set Local Variable" operation.

 

Please let me know if you require further clarifications.

 

Kind regards,

 

George.

 

George Daflidis-Kotsis

SW Support Technical Consultant

0 Likes
doubando Super Contributor.
Super Contributor.

Re: Grep Text from a Variable String

Jump to solution
i have tested RegularExpression but it not accepting ${var} as a variable,

for scriplet i'm not good in java, a help always welcome 🙂
0 Likes
doubando Super Contributor.
Super Contributor.

Re: Grep Text from a Variable String

Jump to solution

Hi George

 

ya it is working with regular expression , my bad

 

thansk for your support

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.