How to extract different strings from strings using UI Path

Hello,

I have a string as

"(3194) Product1 Mix S 1kk description1 (15.12.2014 - ) (3194) Product2 Mix S 1kk description2 (17.12.2014 - ) (3194) Product3 Mix S 1kk description3 (16.12.2014 - )

I only want to extract (15.12.2014 - ) this part in different strings.

Please guide

something like this?

strOutput= strInput.Split('(', ')')[1];

1 Like

Yes … How to do this in UI path. moreover I want all three dates

str1 = (15.12.2014 - )
str2 = (17.12.2014 - )
str3 = (16.12.2014 - )

Try this

strInput.Split(New String() {“(”,“)”}, StringSplitOptions.None)(3)

shall I try this inside assign activity.

Yes and assign it to another String Variable.

It gives error.

campaignSelector.Split(campaignDate, {‘(’ , ‘)’}, StringSplitOptions.None)(3)

where campaignSelector is input string
Campaign date is new string

It should be

string campaignDate = campaignSelector.Split(New String() {"(",")"}, StringSplitOptions.None)(3)

Thankyou soo much
date is extracted. but it gives only one date.

change the index values to get other dates, probably 6 and 9

how you are calculating This index

Please go through below link

1 Like