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

**URL:** <https://community.make.com/t/how-to-insert-variable-inside-a-pattern-using-the-text-parser-module/38433>\
**Category:** Questions\
**Tags:** text-parser, http\
**Created:** [May 22, 2024, 12:47pm UTC](https://community.make.com/t/how-to-insert-variable-inside-a-pattern-using-the-text-parser-module/38433 "2024-05-22T12:47:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ytyt](https://avatars.discourse-cdn.com/v4/letter/y/f0a364/32.png) [@Ytyt](https://community.make.com/u/Ytyt)\
**Post date:** [May 22, 2024, 12:47pm UTC](https://community.make.com/t/how-to-insert-variable-inside-a-pattern-using-the-text-parser-module/38433/1 "2024-05-22T12:47:18Z")

</div>

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](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/7/47d95fc5c05c697b257141d96082aea18fe45680.png)

---

<div class="post-metadata">

**Author:** ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)\
**Post date:** [May 22, 2024, 12:51pm UTC](https://community.make.com/t/how-to-insert-variable-inside-a-pattern-using-the-text-parser-module/38433/2 "2024-05-22T12:51:29Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Ytyt](https://avatars.discourse-cdn.com/v4/letter/y/f0a364/32.png) [@Ytyt](https://community.make.com/u/Ytyt)\
**Post date:** [May 22, 2024, 12:58pm UTC](https://community.make.com/t/how-to-insert-variable-inside-a-pattern-using-the-text-parser-module/38433/3 "2024-05-22T12:58:41Z")

</div>

Thank you, that was exactly what I was looking for! 😀

Here’s the pattern if anyone’s interested:

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

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [June 5, 2024, 1:04pm UTC](https://community.make.com/t/how-to-insert-variable-inside-a-pattern-using-the-text-parser-module/38433/4 "2024-06-05T13:04:10Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


