Split a word in UiPath

Hello All,

I am very new to UiPath, please help me in understanding the split method.
I am trying to split a word, my string is “A4”. I would to get the number as return. I tried the code
StudentExist.Split(“”.ToCharArray)(1).ToString but its returning “A4”

Split is used to extract substrings from the given string that are delimited by the separator.
In your case you don’t have a separator. If the string is always fixed (i.e. 2 letters) then you can easily use Substring as below
“A4”.Substring(1)

If you want to always get the last character for example, you can then use
Right(“A4”,1)

Hope that helps.

2 Likes

Thanks. It worked

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