Use more than one delimiter in Split String Activity?


#1

How to set more than one Separator/Delimiter in Split String Activity.Like i need to set new line and black space characters as Separator/Delimiter.


#2

Hey @ranjith

Please find the attached sample workflow and let me know :slight_smile:
you can simply pass an array of delimiters to them.

spilitstringarray.xaml (7.1 KB)

Regards…!!
Aksh


#3

a Data Manipulation tutorial is coming up real soon


#4

Where i can learn Data manipulation in UiPath


#5

Thanks @aksh1yadav .It Works fine. :slight_smile:


#6

The video tutorial is coming out this week


#7

Hi im having trouble with splitting my string in 2 separate arrays can you please help me im try to place
myString = 1234

and make it {12}(0) and {34}(1)


#8

hi Arvin, Please try as follows:
myString = "1234"
myLeftString = Trim(Left(myString,2))
myRightString = Trim(Right(myString,2))

Note: this works only for 4 digits string. Right function will bring right side 2 characters and left function will bring left side 2 charters only. it could be numbers or alphabets.if you want more generic solution then you have to handle with 2 arrays. 1st one is with {“34”} splitting then resulting you will get 12 values. 2nd array {“12”} result will give 34. assign them separate global variable and use them. Hope my inputs will be useful


#9

I have a csv file and one of the cells i’m reading is Equity Income (238) and i want just the 238. Do you have suggestions?


#10

@tmartin please use the code like this.
string = “(123)”
string = string.Replace("(","" )
string = string.Replace(")", “”)
your string will have now “234”

Hope my inputs are useful.


#11

Thanks. I will try that now. I had it working but then had a new item come in and it is an issue so i need to change to this logic.


#12

So this worked but now i need to trim the text in front of the “(”. I’m trying trimstart and that is not working. i will continue working on that.


#13

Hi,

if you want to remove everything except numbers you can use Regex with the String Replace -activity.
image

br,
Topi


#14

i want to remove numbers if not in side the “( )”


#15

If myString.Contains("(")
{ Replace everything except numbers (img above) }
else
{ Replace all numbers (same as image above but in pattern put “[0-9]”) }