How do I extract information from email subject Line

I’m attempting to extract information from email subject line. Here is the info I need to extract:
Billing Package for: (3 letters)
BL: (N#######)
TransID: (5 to 6 digits)


I going to use “For Each” activity and on the body use “assign”. However, I do not know how to create variable or enter VB expression. Any assistance will be appreciated

You need to get the mail message into an object and then all attributes can be accessed with the properties. Once in an mail object, Easy as mail.subject. If you are processing email, I strongly recommend you take a look at the framework available in the marketplace. ReFramework for MailMessage Data - RPA Component | UiPath Marketplace

Give a try on Regex:

And refer to groups:

For regex also have a look here:

@gustavo_marrufo - Please check this…

Regex Pattern Link - regex101: build, test, and debug regex

Billing Package for: - system.text.regularexpressions.regex.matches(Subject String, Above Regex pattern)(0).groups(1).value

Similar groups(2) , groups(3)…etc…