Page 3 of 3

Re: extracting date information from string

Posted: Thu Sep 01, 2022 3:57 am
by rodneyt
Stam - where's the smiley for {wild applause}?

Re: extracting date information from string

Posted: Thu Sep 01, 2022 8:31 am
by stam
It just occurred to me that a date may be inside parentheses and not be preceded by a space… to cater for this just change the first operator \s to [\s|\(]
In other words the date should be preceded with a space or “(“.

I’ve not tested this exhaustively - if you encounter any issues/missed dates this can probably be adjusted to account for edge cases, just post the text that includes the date, or you can do this yourself using what I do: https://regex101.com/

Hope this helps
S.