Finding Dates and Times in Word document

Hi,

Is it possible to find dates and times of all formats that are present in the document?

Example - If my document contains below text -

First Para - This is a test document containing date and time - 11pm (GMT) on 31 December 2020 marked the end of the transaction. Nullity has the same meaning in relation to both marriage and civil partnership in January 2020 at 11pm.

Second Para - If the unconditional date has not occurred by the date 3 months from and including the date of this Agreement

I will have to find - 11pm, 31 December 2020, January 2020, 11pm, 3 months as a list. I should also be able to extract its paragraph id and number of occurrences of a particular text in that paragraph.
Ex - if 11pm is present twice in first paragraph, then it should form the result like shown below -

For first occurrence → dateTimeText - 11pm, paraId - 1, Occurrence - 1
For second occurrence → dateTimeText - 11pm, paraId - 1, Occurrence - 2

Thanks.

@KCSR You can achieve this using Find/Replace functionality. In your case it is required to use regular expression that will match the required date/time strings in the document. Using IReplacingCallback you can count the occurrences of matched strings and skip replacing them.