Generate Yearly Report TaxID Split

I want to get the value in the “TaxID” field on the ACME website. I was able to get it up to a certain point with the split code I wrote, but the value I wanted was after “:”

Screenshot_3

The text I want: RU567434

The code snippet I use:

StrVendorInformationGetText.Split(Environment.NewLine.ToCharArray)(1)

Hi @tolgademir

Try this:
taxID = StrVendorInformationGetText.Split(":"c)(1).Trim().Split(" "c)(0)

1 Like

Thank you, it is solved.

1 Like

Can you explain this code to me simply ?

@tolgademir

Use this:
taxID = StrVendorInformationGetText.Split(":"c)(1).Trim().Split(Environment.NewLine.ToCharArray)(0).Trim()

  1. It first splits based on the colon (“:”) character and takes the second part (index 1), which gives you “RU567434 Name” and at index 3 “Red Communications Address” and so on…
  2. It then splits this text by a new line (Environment.NewLine), which separates “RU567434” and “Name” into two separate elements in an array.
  3. Finally, it takes the first element of the array (index 0) and trims if any spaces.
1 Like

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