# Difference between Like operator and Equal

**URL:** <https://forum.mautic.org/t/difference-between-like-operator-and-equal/7069>\
**Category:** General Discussion\
**Created:** [January 6, 2017, 4:50am UTC](https://forum.mautic.org/t/difference-between-like-operator-and-equal/7069 "2017-01-06T04:50:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [January 6, 2017, 4:50am UTC](https://forum.mautic.org/t/difference-between-like-operator-and-equal/7069/1 "2017-01-06T04:50:02Z")

</div>

What is the difference between Like operator and Equal operator ?

---

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [January 6, 2017, 4:50am UTC](https://forum.mautic.org/t/difference-between-like-operator-and-equal/7069/2 "2017-01-06T04:50:02Z")

</div>

What is the difference between Like operator and Equal operator ?

---

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [January 7, 2017, 1:59am UTC](https://forum.mautic.org/t/difference-between-like-operator-and-equal/7069/3 "2017-01-07T01:59:59Z")

</div>

AS per my understanding a LIKE is like an include ?  
I am asking this because why I try to do is to sort email address based on what is after the @  
example I want to put in a segment all email with @gmail.com  
Do i undestand well that I should use LIKE @gmail.com for sorting email instead of EQUAL @gmail.com ?

---

<div class="post-metadata">

**Author:** ![MarkLL](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@MarkLL](https://forum.mautic.org/u/MarkLL)\
**Post date:** [January 7, 2017, 7:36am UTC](https://forum.mautic.org/t/difference-between-like-operator-and-equal/7069/4 "2017-01-07T07:36:33Z")

</div>

Hi @laurentm , that’s a good question actually 🙂 and the correct answer is to use the `%` as a wildcard character. so you would use `%@gmail.com` as the value to find all gmail contacts in the filter and then run, via cron, `php appconsole mautic:segments:update` for it to find all the matches from your contacts and add them to your segment. You can also just use `email:%@gmail.com` in the contacts filter to preview / verify the results.
