How to insert variable inside a pattern using the Text Parser module

Hello all,
I’m currently trying to scrape news article to maximise my own productivity.
Everything’s works great, I have all the articles that I need, however I might have too much details. I want to be able to get only the articles from today’s date and the only way to do that is to use a Date variable inside the pattern.
As you can see the pattern is (https://nameofwebsite.com/2024/05/[^\s]]+)
so it’s selecting the links from this month (May 2024), I want to be able to select automatically links from each individual dates, so if I want links from the 24th of May it will be (https://nameofwebsite.com/2024/05/24/[^\s]]+)
I don’t want to do this manualy so the solution is to add a “now” variable in a formatDate DD.
However I’m not able to add variables directly on the pattern. is there any other way to do this ?

Thank you !
image

Hello @Ytyt and welcome to the Make Community!

There is a Match Pattern (Advanced) module that lets you map in a pattern from another module, this might help!

4 Likes

Thank you, that was exactly what I was looking for! :grinning:

Here’s the pattern if anyone’s interested:

(https://nameofweb.com/2024/05/{{formatDate(now; “DD”)}}/[^\s]]+)

3 Likes