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).
lrtetala
(Lakshman Reddy)
June 22, 2023, 10:29am
2
Hi @krishnapriya_Anu
Try with Regex
I hope it will helps!!
rlgandu
(Rajyalakshmi Gandu)
June 22, 2023, 10:34am
3
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
lrtetala
(Lakshman Reddy)
June 22, 2023, 10:44am
5
@krishnapriya_Anu
By using Find Matching Patterns activity we will get the regex output
I hope it will helps!!
Jithesh_R
(Jithesh Karkera)
June 22, 2023, 11:13am
6
Hey @krishnapriya_Anu ,
You can try this in Assign Activity
LetterValue = Left("B100",1)
NumberValue = "B100".Substring(1,"B100".Length-1)
Regards,