Split a string in a format of pdf get full text

Hai,
I have one pdf that is invoice i am using get full text activity and get the text and save it in excel file. It’s working good

See here I msg box is showing
July 8, 2011
4
Laundry service

I want only July 8,2011 not others data

So how I split a line to achieve this

I. Already tried
Mystring.split(Environment.newline.tochararray) it is not working

Thanks regards
Siva

Hi @siva_sankar

Try with the below regex!

System.Text.RegularExpressions.Regex.Match(Client,“^(.*)$”).Value

Regards

2 Likes

Hello @siva_sankar

should have worked.
Are you sure that the string is indeed separated by newlines?

BR,
Mike

1 Like

Hi @siva_sankar ,

Could you pls try like below. the below expression provides you the desired result. thanks.

System.text.RegularExpressions.RegEx.split(InputString, “\n”)(0)

3 Likes

Thank you so much it’s working now

1 Like

If I used this code means msg box is displaying system.string like this only

Thank you this method also working

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