Second line array

hello i have this text in the file txt

TERM DOCTO TDA VEND
002 7158 0075 00000777

In my .xaml I content:

arratTxt: File.ReadAllLines(“C:\TextoLo.txt”)

For each
For each in >arrayTxt

Body
If : item.Contains(“DOCTO”)

Result or output: TERM DOCTO TDA VEND

So, then I need to keep in one variable and new variable “7158” this is dinamic, always after of word “DOCTO”…

How I can do the if , for the next row to find the “7158”

thanks

So DOCTO will always be there. But the number you need (in this case 7158) keeps changing. Is that right?

Just let me know what all values remain static or constant here.

Also, this seems like a table in text format to me. So, will the DOCTO column always be the second column or will that change, too?

right, DOCTO is always the same , the same word , the same position but only the array 7158 always change , only you have the same position under DOCTO

Main (1).xaml (55.9 KB)
and this is the information of .txt


            CANCUN                

TERM DOCTO TDA VEND
002 7158 0075 00000777

  ATENDIO: SIETE                  

COMPUTADOR $ 105,226.71
ENTREGADO $ 0.00
DIFERENCIA $ -114,937.43
DEVOLUCIàN $ 1,217,265.00
PUNTOS RIFA $ 0.00

Try this. Test.zip (2.3 KB)

I’ve used Regex here. Let me know if this works for you.

ok thank you I will check the .zip,

thanks and I will tell you the answer

thnaks again!