Which regex pattern to use if I want to retrieve only the word that is between the time and the word Aging?

I’m using the matches activity and try to find the correct pattern without sucess.
Which regex pattern should I use if I want to retrieve only the word that is between the time and the word Aging?

So for instance I want to retrieve the word “Allseas Brasil Ltda”

Report Date: 2022/03/22 14:38 Allseas Brasil Ltda Aging

Thanks in advance for your help.

Rgds.
Maic

Hi @mce ,

Could you give this a try?

image

(?<=\d+\:\d+\s)(.*)(?=\sAging)

image

System.Text.RegularExpressions.Regex.Match(str_variable,"(?<=\:\d+\s)(.*)(?=\sAging)").Value

Kind Regards,
Ashwin A.K

HI @mce

Try this expression

System.text.regularExpressions.Regex.Match(“Report Date: 2022/03/22 14:38 Allseas Brasil Ltda Aging”,“\D+$”).ToString

Regards
Sudharsan

It doesnt work as sometimes I can have more text after the text like in the below example:

Report Date: 2022/03/22 14:38 Allseas Brasil Ltda Aging - Collector By Report Order By : Collector Reporting Level : Ledger Reporting Context : Allseas Brasil Ltda Balancing Segment As of GL Date To : 31-DEC-21 Summary Type : Detailed Report Format : Invoice Summary Bucket Name : Collections Show Credits Open : Age Show Receipts At Risk : Do Not Show Entered Currency : Customer Name : Customer Number To : Balance Due To : Transaction Type To : TRADE CREDIT MEMO Collector To TRADE : INVOICE To

Do you have another idea?

Okay So @mce the word will always end with Aging?

if Yes you go on with @ashwin.ashok 's Expression

Regards
Sudharsan

@mce Try the below one

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