I need to extract the data only the starting 10 digts from the string but it has number and digits but i need only the starting 10 digits
Input = Id : HPR7849EJ15Q
Can any one help but the id is not constant
I need to extract the data only the starting 10 digts from the string but it has number and digits but i need only the starting 10 digits
Input = Id : HPR7849EJ15Q
Can any one help but the id is not constant
There aren’t 10 digits in that string. Digits are numbers. Do you mean you need the first 10 characters of the string that’s after the :
?
yourStringVar.Split(":")(1).Trim.Left(10)
This splits the value on the : character which gives you an array of two elements, then takes the element with index 1 (second element), trims the extra space(s) off the begining and end, then takes the left 10 characters.
Use this expression in uAssign activity
str_output = Split(str_input.ToString.Trim, “:”)(1).ToString.Trim.SubString(0,10)
This SubString will give the 10 character you want
Hope this helps
Cheers @vikas_Kumar1
I have input like this
Id : HPR7849EJ15Q
Id :HPR7849EJ15Q
sometimes without space also but it’s working for me thats why i have closed this loop @Palaniyappan
Sorry, use Substring(0,10) instead of Left(10)
I get my languages mixed up sometimes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.