# Nice to know )-; using "contains as a matcher"

**URL:** <https://community.dynatrace.com/t/nice-to-know-using-contains-as-a-matcher/50502>\
**Category:** Logs\
**Tags:** log-processing, log-monitoring-class, logs\
**Created:** [February 28, 2025, 10:10am UTC](https://community.dynatrace.com/t/nice-to-know-using-contains-as-a-matcher/50502 "2025-02-28T10:10:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 28, 2025, 10:10am UTC](https://community.dynatrace.com/t/nice-to-know-using-contains-as-a-matcher/50502/1 "2025-02-28T10:10:23Z")

</div>

Hello all,

So I can use “contains” in a dql filter but not as a matcher when creating a log-metric:

 ![henk_stobbe_0-1740737370174.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/5764a3d800950c3bc0c5a3dfc355f3233f29a759.png)

KR&nbsp; Henk

---

<div class="post-metadata">

**Author:** ![KeeganNelson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/keegannelson/32/20333_2.png) [@KeeganNelson](https://community.dynatrace.com/u/KeeganNelson)\
**Post date:** [February 28, 2025, 7:14pm UTC](https://community.dynatrace.com/t/nice-to-know-using-contains-as-a-matcher/50502/2 "2025-02-28T19:14:03Z")

</div>

Hi Henk!

I think the equivalent of this would be using matchesPhrase. [DOCS](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-processing-matcher).

 ![KeeganNelson_0-1740770014140.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/0/f0bb1bb1b360661d919c5405b542374985d45eaa.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 28, 2025, 7:30pm UTC](https://community.dynatrace.com/t/nice-to-know-using-contains-as-a-matcher/50502/3 "2025-02-28T19:30:58Z")

</div>

matchesPhrase is a case-insensitive contains, so you are 90% right (-;

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [February 28, 2025, 8:02pm UTC](https://community.dynatrace.com/t/nice-to-know-using-contains-as-a-matcher/50502/4 "2025-02-28T20:02:37Z")

</div>

matchesPhrase does have some special character limitations as well, but you can use the caseSensitive flag on matchesPhrase to make it case sensitive if you want

matchesPhrase(content, “test”, caseSensitive:true)
