Extracting the first line from the string

Hello Friends,

I need to extract the first line in text. the first line varies in length because I am running the loop to extract text from different pdf pages, e.g. first line can be 2 yrs or 2 years 6 months. Is there any easy workaround this.

1 Like

Hi @Rita_Balmukund_Jaisw,

Try below :
FirsLineText = YourStringVariable.Split(VbNewLine.ToCharArray,StringSplitOptions.RemoveEmptyEntries)(0)

Thanks.!
Ramprasad

3 Likes

Thanks…this works

1 Like

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