# Use Of Regex In DQL

**URL:** <https://community.dynatrace.com/t/use-of-regex-in-dql/52998>\
**Category:** DQL\
**Tags:** dql, logs\
**Created:** [August 18, 2025, 1:59pm UTC](https://community.dynatrace.com/t/use-of-regex-in-dql/52998 "2025-08-18T13:59:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhay-ramekar](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@abhay-ramekar](https://community.dynatrace.com/u/abhay-ramekar)\
**Post date:** [August 18, 2025, 1:59pm UTC](https://community.dynatrace.com/t/use-of-regex-in-dql/52998/1 "2025-08-18T13:59:48Z")

</div>

Hello All,

I would like to use regex in dql, please guide me on this.

Below is my use case - If I want to use this below regex in DQL tp create alert&nbsp; or dashboard how can I achieve it.  
1. | rex field=\_raw ““PONumber(?\<PONumber\>.\*)””

Thanks.

---

<div class="post-metadata">

**Author:** ![Akhil-Jayendran](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/akhil-jayendran/32/153_2.png) [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Post date:** [August 18, 2025, 4:31pm UTC](https://community.dynatrace.com/t/use-of-regex-in-dql/52998/2 "2025-08-18T16:31:57Z")

</div>

Hi&nbsp;[@abhay-ramekar](https://community.dynatrace.com/user/82215)&nbsp;,

You cannot use regex in DQL, but you can use &nbsp;DPL,&nbsp;which replaces regex and does the job&nbsp;more easily.

> **[Dynatrace Pattern Language](https://docs.dynatrace.com/docs/platform/grail/dynatrace-pattern-language)**
>
> Use Dynatrace Pattern Language to describe patterns using matchers.

If you share a dummy log may be we can help to build a query based on DPL.

regards,

Akhil Jayendran
