Finding Values within Variables

Hi Guys,
i have a question. Lets assume i have a global Array Variable in the Form:
|Name 1|Text 1|Text 2|Text 3|
|Name 1|Text 2|Text 3|Text 4|
|Name 2|Text 3|Text 4|Text 5|
|Name 2|Text 4|Text 5|Text 6|
|Name 3|Text 5|Text 6|Text 7|
|Name 3|Text 6|Text 7|Text 8|

I want to look up the Row Where Name 3 is and transfer all the Rows to a 2nd Variable so the second Variable contains:
|Name 3|Text 5|Text 6|Text 7|
|Name 3|Text 6|Text 7|Text 8|

How should i proceed in order to achieve that?

This checks each line of a variable containing multiple lines to append any line matching a condition to another variable:

Subset Macro (v10.2)

Subset.kmmacros (5.2 KB)

3 Likes

You could also just do a multiline regex search and save the capture group to a new variable:

(?m)[\s\S]*?(\|Name 3[\s\S]*)