Need to find index of array value in text file

first need to get index value after that i need to get some name value not name value after 40B

Hi @Anil_Rajavarapu

Please look into this sample workflow
My text file contains countries i am assuming France country
Array_Countries=Text.Split(Environment.NewLine)
Index_Countries=Array.IndexOf(Array_Countries,“France”)

image

I hope it helps!!

Why do you need the index? And what do you mean index, index of what?

So change the regex to do that.

Regex.Match(currentItem,"(?<=40B: Name.*\n).*").ToString.Trim

image

but same condition i am using but i am getting index value is 0

why I need an index means there is 1 lacs rows in text file so i need to check dynamically one by one
for example
40B: Address
MPF2+97C
Madinat Za’id -
Abu Dhabi - United Arab Emirates
So I need to check if the address is MPF2+97C I need to copy the entire data or need to remove particular data
sorry my bad actually i can’t share exact format becuase this is the banking data

what is the array_Contries varaible

@Anil_Rajavarapu

Array_Countries----String(Array)-------Text.Split(Environment.NewLine)
Index_Countries----Int(32)---------Array.IndexOf(Array_Countries,“MPF2+97C”)

@Anil_Rajavarapu

For the given input it is in index 1

I hope it works!!