Help with delimited text parsing in pattern?

Rick54
Tera Expert

Hello - I am trying to parse below plain text output to various temp variables but I couldn't do it. Can someone please validate and give me the right direction?

I am trying to store variables after '=' in temp variables

 

find_real_file.png

Thanks!

7 REPLIES 7

doug_schulze
ServiceNow Employee
ServiceNow Employee

So got two ways and I really dont like either but checking with the big brains around the water cooler, these are your options...

so starting with a similar file...

find_real_file.png

then you parse out just the name and put it in a temptable.name

 

find_real_file.png

rinse and repeat for version.

OR

grab the individual returns, "knowing" what each value field will be [1]=name [2]=verison

find_real_file.png

Or

bring both pairs into a temptable then parse that table out again to retrieve the name and version lines individually

find_real_file.pnglike i said, its not the prettiest way of doing it but should get you over the proverbial hump.

 

Aditya Kumar4
ServiceNow Employee
ServiceNow Employee

You can make use of the regex, or you can use an eval script to get the 2 values in a table,

You can refer "Linux Server" pattern under "Linux storage" library Step: "Insert data to proc_ide".

 

Veeru Chinta
ServiceNow Employee
ServiceNow Employee

You can use the Filter table operation to retrieve the target value

1. Parse the command output/ variable/ File using delimiter to populate data in the table format.

Example -Parse the variable using delimiter "=". 

find_real_file.png

2. Use Filter table operation to get the target value.

 Example -Get the version value

find_real_file.png