RegEx date range capture and conversion

  • Last Post 16 April 2018
Jarl Arntzen posted this 02 April 2018

Hi, all.

We're trying to capture date ranges based on line item descriptions only by using regular expressions.

For example, we would like to capture descriptions such as: "House rent, 4th quarter" and then convert that to a useful date range such as "2018-10-01 -- 2018-12-31" which will then be used in logic regarding date periods.

I have been trying to research the available options here but I can not find anything related to capturing a date range, only to single dates.

What would be the best option for capturing these types of date ranges?

Should I try to capture the same date string object twice using RegEx and then convert the first capture to 2018-10-01 and the second capture to 2018-12-31?

Thanks in advance for any suggestions and advice.

AlexeyEfremov posted this 16 April 2018

Hello Jarl,

Unfortunately this problem is pure coding and not FlexiCapture-related therefore it is out of the scope of this forum. I could recommend you to post your questions to programming forums like

I personally do not see any other solution other than creating a lot of regex-es and trying to apply them one-by-one.

Yours sincerely,