Match date from a text

Hello,

Please help me to identify in unic mode de date from the text below:

"

1 Assurance auto ----- 1.0000 1,680.00 1,680.00 0.00
Policy no. 11380707636 rate no. 1: 1680.00 RON; Series auto:
W0J2971331A008113; Period: 23/02/2023 -
22/08/2023
Series auto: W0J2971331A008113
Due date: 08.02.2023 Total without VAT 1,680.00
"

Thank you,

Hi @LZlz

Do you need date highlighted in bold ?

Hi,
Yes, I want a regex formula to extract 23/02/2023-22/08/2023

Hi @LZlz ,

Could you Check with the regex Expression below :

(?<=Period:)(.*\n)*(?=Series auto:)

image

Expression :

Regex.Replace(Regex.Match(yourStrVar,"(?<=Period:)(.*\n)*(?=Series auto:)",RegexOptions.IgnoreCase).Value.Trim,"\r?\n?","")

The above should also remove the newline present in the data.

Visuals :
image

Let us know if the above does not work.

1 Like

Great!

Thank you!

1 Like

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