Need to extract data from textfile

Hi

I need to extract “99864060” from attached text file.
please help me.
TextFile.txt (204.7 KB)

Hi,

Is there any rule or fixed string to get your target string?

Regards,

its a fixed string. There is no rule.

Hello @shruthi_arali

Can you tell us more about the number?

  • Length?
  • Always at the end of line?
  • What is consistent around it?

Its a PO Number. It is displayed under PO Number. Length is constant.

HI,

How about the following expression? This extract numeric characters which exists at the end of the next line of “PO NUMBER” (Because I guess it’s PO NUMBER)

System.Text.RegularExpressions.Regex.Match(strData,"(?<=PO NUMBER[\s\S]+?)\d+(?=\r?\n|$)").Value

Sample20230907-3L.zip (14.4 KB)

Regards,

1 Like

Thank you @Yoichi:slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.