Split string in following method

Hi,

I would like to split the following string:

Before Spliting :
Client Id:CX76110
Client Name:Mirian Derosier
Client Country:German

After Spliting :
CX76110-Mirian Derosier-German

Please help me advance in thanks

1 Like

@gokult

Welcome back to our uipath community.

Please check below thread and follow the steps to do this.

Hi @gokult,
Let
var str=“Client Id:CX76110
Client Name:Mirian Derosier
Client Country:German”

You can get the required output by splitting it using : character, as follows

Var strArray = str.split(":“c, stringsplitoptions.none)
str = strArray(1)+” “+strArray(3)+” "+strArray(5)

Try This
CVAL.Split({VBLF},StringSplitOptions.None)(0).Trim.Split({":"},StringSplitOptions.None)(1).Trim
CVAL.Split({VBLF},StringSplitOptions.None)(1).Trim.Split({":"},StringSplitOptions.None)(1).Trim
CVAL.Split({VBLF},StringSplitOptions.None)(2).Trim.Split({":"},StringSplitOptions.None)(1).Trim

Here CVAL is your before split string
If it doesnt work use
VBCRLF INSTEAD OF VBLF

Hi @ImPratham45, @shankm @lakshman

Thanks for your valuable comment.I will check and let you know

3 Likes