# \[bug\] host-pattern rule do not compatible with older versions

**URL:** <https://forum.ansible.com/t/bug-host-pattern-rule-do-not-compatible-with-older-versions/16632>\
**Category:** Ansible Developer\
**Created:** [October 29, 2014, 8:12am UTC](https://forum.ansible.com/t/bug-host-pattern-rule-do-not-compatible-with-older-versions/16632 "2014-10-29T08:12:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Chen](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@Bob\_Chen](https://forum.ansible.com/u/Bob_Chen)\
**Post date:** [October 29, 2014, 8:12am UTC](https://forum.ansible.com/t/bug-host-pattern-rule-do-not-compatible-with-older-versions/16632/1 "2014-10-29T08:12:18Z")

</div>

in older versions, list\_host = re.search(group.name) + re.search(host.name)

in version 1.7.2, list\_host = re.search(group.name) + re.match(host.name)

for example, in v1.6

> > [chengshengbo@sd-ml-im-tool01 tmp]$ ansible ‘~a-fe’ --list
> 
> > sd-a-fe01.bj
> 
> > sd-a-fe02.bj
> 
> > sd-a-fe03.bj
> 
> > sd-a-fe04.bj

but in v1.7.2

> [chengshengbo@sd-ml-im-tool01 tmp]$ ansible ‘~a-fe’ --list

> No host matched

it should be a bug, hopes can fix it:  
[https://github.com/iambocai/ansible/commit/f475c5a6e927bb69eb0487a43291cf7304be8e54](https://github.com/iambocai/ansible/commit/f475c5a6e927bb69eb0487a43291cf7304be8e54)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 5:15pm UTC](https://forum.ansible.com/t/bug-host-pattern-rule-do-not-compatible-with-older-versions/16632/2 "2014-10-30T17:15:46Z")

</div>

Hi Bob,

You can report this at [http://github.com/ansible/ansible](http://github.com/ansible/ansible).

Thanks!
