Split the words

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 :?


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.

Hi @vikas_Kumar1

You can try this way



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 tried this but it’s giving the left is not a member of string


I have tried this working as expected thanks brother


Isn’t it giving space also @vikas_Kumar1

1 Like

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

1 Like

Cool then @vikas_Kumar1

Sorry, use Substring(0,10) instead of Left(10)

I get my languages mixed up sometimes :slight_smile:

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