String Manipulation using delimeter

Hi.
Suppose I have a string ID = 123##Bank##222 ( The IDs are seperated by ##)
I have another string Name = uipath
If there are three IDs then I have to pass the Name three times like this uipath##uipath##uiapth

If ID= aa##aa
Name=hhh
then the name variable should be hhh##hhh
If ID= aa then name should be hhh

Hi,
you can try this:

arr_ids = Split(ids,"##")
String.Join("##",new_id, name).TrimStart("#"c)

Variables:

Output:
image

Hi, will can use a simple regular expression for that.

Assign:

Result = Regex.Replace(YourID, "[^#]+", TheAnotherString)

E.g:

Result = Regex.Replace("123##Bank##222", "[^#]+", "uipath")

Result is: uipath##uipath##uipath

2 Likes