Need Help in Regex From Email Subject

Hello,
I want to extract the company name from email subject.

54267 ABC COMPANY EXPENSE_24_05_2024 12:25:36

Please note the Amount before ABC COMPANY will always be floating since expense amount will vary company to company but Expense will be Expense word will be constant followed by timestamp.

Thanks in Advance

HI @Binod_Kumar_Biswal

[A-Za-z]+.*(?=\s+EXPENSE)

Regards

Hi @vrdabberu ,

Thanks for the reply but I am getting the below error.

Hi @Binod_Kumar_Biswal

Please use the below syntax:


System.Text.RegularExpressions.Regex.Match(SubjectLine,"[A-Za-z]+.*(?=\s+EXPENSE)").Value.ToString.Trim()

Regards

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