Substring without knowing the word's length

Hello all,

I am having a issue with the substring method. I do not know the length of the row, so I do:

Length = item.Length.

After that, I want to get a word of the line that I know that begins in 20.

So, how can i get the word? Word = item.Substring(20, Length)

I did that and it is not working.

Thanks :slight_smile:

@Angel_Llull
May we ask you to share the string sample, the expected substring with us. Thanks
In case of issues also tell us what you have done so far and what are details on the fail (wrong output, exceptions…)

Hi @ppr

For example in this line: “2201822368201118201118061432000000000912620000000000ABON.REME. COMERC” I want to get “ABON.REME. COMERC”, and until the last 0, there are the same characters for all lines of the document.The problem is that the characters of the text ("ABON.REME. COMERC) can vary.

I am not sure, how can I get the text. Do you have any idea?

Many thanks :slight_smile:

@Angel_Llull
give a try on:
grafik

if digit part is fixed:
grafik

Many thanks @ppr! It worked! :slight_smile:

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