# Test substring using Liquid syntax

**URL:** <https://community.auth0.com/t/test-substring-using-liquid-syntax/81696>\
**Category:** Get Help\
**Tags:** liquid-syntax\
**Created:** [April 13, 2022, 3:41pm UTC](https://community.auth0.com/t/test-substring-using-liquid-syntax/81696 "2022-04-13T15:41:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![teguayco.gutierrez](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teguayco.gutierrez/32/33497_2.png) [@teguayco.gutierrez](https://community.auth0.com/u/teguayco.gutierrez)\
**Post date:** [April 13, 2022, 3:41pm UTC](https://community.auth0.com/t/test-substring-using-liquid-syntax/81696/1 "2022-04-13T15:41:33Z")

</div>

I have been reviewing the list of methods available in [Liquid syntax](https://auth0.com/docs/customize/email/email-templates/use-liquid-syntax-in-email-templates).

I wonder if there’s something like `{% if link.includes('localhost') %}`, similarly to `{% if user.user_metadata.lang == 'en' %}`

I need to use something like this in my login email template given that two or more different templates cannot be configured for the magic link email.

---

<div class="post-metadata">

**Author:** ![teguayco.gutierrez](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teguayco.gutierrez/32/33497_2.png) [@teguayco.gutierrez](https://community.auth0.com/u/teguayco.gutierrez)\
**Post date:** [April 13, 2022, 3:48pm UTC](https://community.auth0.com/t/test-substring-using-liquid-syntax/81696/2 "2022-04-13T15:48:01Z")

</div>

I just answered myself. Hope it helps someone else:

```auto
# string = 'hello world'
{% if string contains 'hello' %}
   string includes 'hello'
{% endif %}

```

Source: [Liquid for Designers · Shopify/liquid Wiki · GitHub](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#case-statement)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 14, 2022, 9:21am UTC](https://community.auth0.com/t/test-substring-using-liquid-syntax/81696/3 "2022-04-14T09:21:18Z")

</div>

Wooohooo! Thanks for sharing it with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 14, 2022, 10:37am UTC](https://community.auth0.com/t/test-substring-using-liquid-syntax/81696/4 "2022-04-14T10:37:10Z")

</div>


