# wierd substitution at regex\_replace filter

**URL:** <https://forum.ansible.com/t/wierd-substitution-at-regex-replace-filter/19258>\
**Category:** Ansible Project\
**Created:** [September 14, 2015, 1:49pm UTC](https://forum.ansible.com/t/wierd-substitution-at-regex-replace-filter/19258 "2015-09-14T13:49:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Tamas](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frank\_Tamas](https://forum.ansible.com/u/Frank_Tamas)\
**Post date:** [September 14, 2015, 1:49pm UTC](https://forum.ansible.com/t/wierd-substitution-at-regex-replace-filter/19258/1 "2015-09-14T13:49:22Z")

</div>

Hi,

I need a list with the ip address of play\_hosts. This template worked with 1.6.5, but it does not work with 1.9.3. I would appreciate any help, what could be wrong.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [September 18, 2015, 7:20am UTC](https://forum.ansible.com/t/wierd-substitution-at-regex-replace-filter/19258/2 "2015-09-18T07:20:42Z")

</div>

I think list is now a filter so perhaps try without the () on the end of list

Not sure you can have {{ }} inside other {{ }} so maybe needs breaking into two parts, set\_fact to get the list of regex replaced play hosts and then looking up the address from hostvars as a second step.

Hope that helps.

Jon
