# Ansible find module , can path parameter include regex ?

**URL:** <https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628>\
**Category:** Ansible Project\
**Created:** [May 25, 2018, 12:36pm UTC](https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628 "2018-05-25T12:36:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saranya\_N](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Post date:** [May 25, 2018, 12:36pm UTC](https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628/1 "2018-05-25T12:36:55Z")

</div>

Hi all ,

I'm trying to find files dit.xml under particular directories.

Rather than mentioning the directories as a list like below

Path : [/opt/local/version\_v1.3.1 , /opt/local/version\_v1.3.0]

I tried /opt/local/version\_v1.3.\* and it didn't work.

Actually I have dit.xml files under /opt/local/version\_v1.5.0 which I don't want to modify.

That's y looking for regex for paths.

Is it possible? Kindly suggest

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 25, 2018, 6:13pm UTC](https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628/2 "2018-05-25T18:13:14Z")

</div>

Since it's not in the documentation it's not supported.

What you could do is first a find that finds the directories and exclude the once you don't want.  
The result of that find is used in the second find to find the correct files.

---

<div class="post-metadata">

**Author:** ![Saranya\_N](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Post date:** [May 27, 2018, 9:25am UTC](https://forum.ansible.com/t/ansible-find-module-can-path-parameter-include-regex/27628/3 "2018-05-27T09:25:57Z")

</div>

Thank you Kai , I’ll try that out.
