Need to extract data from textfile


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


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


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.


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 (14.4 KB)


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.