# Search in File for a character - out of the box module

**URL:** <https://forum.ansible.com/t/search-in-file-for-a-character-out-of-the-box-module/17755>\
**Category:** Ansible Project\
**Created:** [March 16, 2015, 5:10pm UTC](https://forum.ansible.com/t/search-in-file-for-a-character-out-of-the-box-module/17755 "2015-03-16T17:10:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Mulder](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Michael\_Mulder](https://forum.ansible.com/u/Michael_Mulder)\
**Post date:** [March 16, 2015, 5:10pm UTC](https://forum.ansible.com/t/search-in-file-for-a-character-out-of-the-box-module/17755/1 "2015-03-16T17:10:06Z")

</div>

Hi  
I simply want to search in a file if there is at lease one occurance of “@” inside. An ansible module is prefered

I tried a little a bit with replace and lineinfile module and check the result variabel, but maybe there is a simpler out of the box way.

```auto
- name: replace
  replace: dest=test.properties
    regexp="@"
    replace="@"
    backup=yes
  register: result

```

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 16, 2015, 5:33pm UTC](https://forum.ansible.com/t/search-in-file-for-a-character-out-of-the-box-module/17755/2 "2015-03-16T17:33:01Z")

</div>

no grep module yet, so "shell: grep .." is probably your best bet.
