Split the String and integer

Actually, the value stored in the variable is B100.

I want to split the first letter and store the first letter value as a string variable (value like B).

After splitting the string, I want to store the integer separately and assign the value to an integer variable (value like 100).

Hi @krishnapriya_Anu
Try with Regex
image

image

I hope it will helps!!

Hi,
I hope this will help you

System.Text.RegularExpressions.Regex.Match(“YourString”,“\D+”).Value
Str_num=System.Text.RegularExpressions.Regex.Match(“YourString”,“[0-9]+”).Value
Str_num is string so we have to convert it to int
Use Assign
Int_Num=Convert.ToInt32(Str_Num)
The Int_Num datatype is Integer

Thank you

@krishnapriya_Anu
By using Find Matching Patterns activity we will get the regex output

I hope it will helps!!

Hey @krishnapriya_Anu ,
You can try this in Assign Activity

LetterValue = Left("B100",1)

NumberValue = "B100".Substring(1,"B100".Length-1)

Regards,