Splitt

I have a word as “A5” now want to spit A in 1st index 5 in next index

Its typical use case for RegEx. Please provide us more specification info. Could it be the case that also two letter,more letter columns will occur? How many rows are you expecting in max. I assume that your string is an EXCEL Range info, am I right?

1 Like

Lets assume the Regex will get one result and only the first match is to process: so RegEx could be:
([A-Z]+)([0-9]+) flow could be like:

Hi @Sweety_Girl,

When you have a word and want to convert it into Array of Characters
Then simply use .ToCharArray method on it.

ArrChar = Text.ToCharArray

ArrChar(0) —> A
ArrChar(1) —> 5

Split wont work in my use case…

I am getting the cell range it may be A5 or A67

so…

@Sweety_Girl
Okay then use following code to extract numbers from the string,

digits1 (String) = System.Text.RegularExpressions.Regex.Replace(str1,"\D","")

basically it’ll replace non digits with null.
Now you have digits in digits1 variable, you can use it in split to get characters

str1 = str1.Split({digits1},StringSplitOptions.None).First

Will it take all the string or only 1 character

1 Like

all remaining string (non digits)

1 Like

Hi @Sweety_Girl,
you can try it as below.
alphaChar= regex.replace(Trim(yourString),"[^a-zA-Z]","")
intChar=regex.replace(Trim(yourString),"[^0-9]","")

Thanks!