E-Mail:
---------------------------------------
Dear,
• irrelevant text 15.11.2024
• irrelevant text 19.11.2024
• irrelevant text 21.11.2024
------------------------------------------
I want to extract only extracts the dates in red and save each one in different compose to use it later. I do not want to split based on the bullet points "•" as it might change in the future. What I achieved so far is the following array:
[
" 15.11.2024 ",
"· irrelevanttext 19.11.2024 ",
"· irrelevanttext 21.11.2024"
]
I split after the first irrlevant text starts an ignore the rest of the e-mail. The problem is that I have spaces after and before each string. and I also have the bulletpoint "·" at the beginning of the string. How can clean each one so I only have dates and store them in different compose?
thanks in advance!