[SOLVED] Read markdown file content

I have 100 markdown files (.md files) and I want to scan their content and find if they have a specific date range using RegEx - in this case I would be using something like this :
(Dec\s)[0-9]{2}(,\s2023)

KM would scan all 100 files' content and those that match that RegEx, I would get their path and save all of those paths to a variable. The dates are inside the file itself, not the file name.

Is this possible, to read the file's content? I saw a post here on the forum, but it was related to PDFs, so I'm not sure if there's a way to read other formats?

This should get you started.


This will loop over each selected file and read the contents.
You then need to add the logic to find the matching files.

1 Like

Thanks. That worked like a charm!

1 Like