Extract Invoice number from Email Subject

Hi I need to extract the invoice number from the email subject which is generally at the end of the email subject.
For example: “FW: Settlement Invoice: Xyz company 2023 final deal 653457”.
From above how do I need to extract the"653457" number only.

TIA

@Binod_Kumar_Biswal

Please try this in assign activity

Invnum = system.Text.RegularExpressions.Regex.Match(subject.Trim,"\d+$").Value

Subject is the place where subject needs to be given…added .Trim for safety r
To remove extra spaces at end if present

Assuming the last digits are invoice as mentioned

Cheers

Thanks,
Srini

Thanks,
Srini

Hi @Binod_Kumar_Biswal ,

Here’s another approach:

SubjectString.Split(" ").Last

image

Regards,