Not able to split client information with \n\r

Hi ,

can any one please help on this ,I am completely stopped by splinting the client info.Please guide me as i am new to uipath.

This is my client info for one iteam: Client ID: RI52540\r\nClient Name: Camilla Escarcega\r\nClient Country: Romania
String Client_Information=Client ID: RI52540\r\nClient Name: Camilla Escarcega\r\nClient Country:Romania
String ClientInfo=Client_Information.split(CChar("\n\r"))
I am trying to split with “\r\n”.but the same string is returning as it is.
I want to split Client Id ,Client Name and Client Country.


Could be because \ can be interpreted as an escape character. Can you try splitting with \r\n?

Hi @prasanna.Ui
First I wanna say that in your string you have “\r\n” as the separator, but in the split function you used “\n\r”
In either cases you can use this xaml file, enjoy :wink:

Main.xaml (7.2 KB)

Hi reda,
Thank you for help.

I fallowed same steps as you said but the issue is as it is.below steps i m doing to to split.
getting text using ‘getText’ activity from web page and storing in ‘client_info’ string variable.and splitting using delimiter “\r\n”.

below is property value i am getting into ‘client_info’ variable.

after splitting value with delimiter one element in the array.


Hi @prasanna.Ui
sorry for the delay, well I think you want only the values of each individual item rather than the name of it (RI52540 instead of Client ID: RI52540)
please see attached xaml

System1_ExtractClientInformation.xaml (9.7 KB)

you have to split using this :
ClientInfoStr.Split({"Client ID: ","Client Name: ","Client Country: "},StringSplitOptions.None)

and then clear the strings inside the array of any newLines that are inside the string they could be:

vbCr : - return to line beginning
vbLf : - go to next line

so you would use :
ClientInfo(x).ToString.Replace(vbCr, “”).Replace(vbLf, “”)

Anyway everything is inside the sequence attached enjoy :wink: :slight_smile:


Hi reda,

great help, it worked for me.

Thank you very much.

1 Like

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