Getting @ in Array string

array : String[2] {“123345456”,@“123453”} Now from this arrat item 2 i have to remove @ sign. @ sign is not part of string. so I can’t use replace in UiPath.

I want to use that number one by one for query. first item gives proper result in query as its only number however 2nd item comes with @ like : @“123453” which gives error. so need to remove @ or some other alternative for this.

THANKS IN ADVANCED!

Hi @dheerajdatastorage

Check the below thread

Regards

My String str1 is:
@“2131723534,
9095932281,
,
, ,
, ,
, ,
, ,
,
,
,
,”

I split that with coma ‘,’ in Arr1

Arr1 become:
string[33] { “2131723534”, “”, @"
9095932281", “”, “”, @"
“, “”, “”, @”
", " “, “”, @”
", " “, “”, @”
", " “, “”, @”
", " “, “”, @”
“, “”, “”, @”
“, “”, “”, @”
“, “”, “”, @”
", “”, “”, “” }

then I removed blank items:
using:
Array.FindAll(Arr1, Function(x) Not (String.IsNullOrEmpty(x) or String.IsNullOrWhiteSpace(x)))

@ was there from starting

@dheerajdatastorage

At the start of the string @ would be visible if you see in locals panel…but if you log it …you would not see…it basically tells that there is a new line in the string and all

Cheers

Trim the splits with (customized) trim

assign Activity
ArrSplitsCleansed | String Array =

YoutStringArrayVar.Select(function (x) x.trim).toArray

After using
YoutStringVar.Split(“.”.tochararray,StringSplitoptions.RemoveEmptyEntries).Select(function (x) x.trim).toArray

arr1 value
string[3] { “123345567”, @"
354354353", “1243454” }

@ is still there… No use :frowning:

please share with us the output from the immediate panel of your origin variable

Also have a look here:
grafik

1 Like

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