How to get only numbers from this sentence

i received a mail .subject .contains (id-45616556).now i need to get only numbers from the subject
mail.subject.contains(id-4565546).then i need only numbers from this subject in message box.
what is the expression i have to enter…please suggest

Hi @gowrishankar_allada

You Can try with Split method!

Item.Subject.Split("-"c)(1) will give numbers only!

Regards

1 Like

Hi @gowrishankar_allada ,

Please use split method to get only numbers

output=input_var.Split("-"c).Last

Thanks,

1 Like

@gowrishankar_allada

Welcome to forums

You can use Regex for this

UiPath Screenshot as below

image

Regex : system.Text.RegularExpressions.Regex.Match(Subject,"\d+").Value

Hope this may help you

Thanks

1 Like

tq so much

1 Like

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