<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DQL Regex in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Use-Regex-in-Dynatrace-DQL-Queries-for-Advanced-Filtering/m-p/246079#M914</link>
    <description>&lt;P&gt;You cannot use regex in DPL, but DPL is a pattern matching and parsing language which replaces regex and does the job easier.&lt;BR /&gt;&lt;BR /&gt;Actually such format is not a problem:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(content="[critical] consumer.go:117 [!dt dt.trace_id=xxxxx,dt.span_id=xxxx][request_id=xxxx][session_id=][user_id=xxxxxxx]Queue: xxxxxxxx~~~Message type: createQuoteSummaryTask~~~~~~Error:~~~Code: Some Error here ~~~Message: ~~~Stack:~~~goroutine 315080")
| parse content, "LD 'Error:' LD:error_message 'Message:'"&lt;/LI-CODE&gt;&lt;P&gt;Of course if you want to take out other fields from such a log line it is possible as well as making the pattern more precise, so it does not catch similar log lines&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1716205154747.png" style="width: 852px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19975iE23D12575AA2F38A/image-dimensions/852x179?v=v2" width="852" height="179" role="button" title="krzysztof_hoja_0-1716205154747.png" alt="krzysztof_hoja_0-1716205154747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2024 11:40:33 GMT</pubDate>
    <dc:creator>krzysztof_hoja</dc:creator>
    <dc:date>2024-05-20T11:40:33Z</dc:date>
    <item>
      <title>Use Regex in Dynatrace DQL Queries for Advanced Filtering</title>
      <link>https://community.dynatrace.com/t5/DQL/Use-Regex-in-Dynatrace-DQL-Queries-for-Advanced-Filtering/m-p/245636#M889</link>
      <description>&lt;P&gt;&lt;EM&gt;Summary:&amp;nbsp;Dynatrace Query Language (DQL) supports regex for advanced filtering and pattern matching. This thread explains syntax, examples, and best practices for using regex in log and metric queries.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Hey folks!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;DQL is amazing. It works very well when the logs is in a json format. However, I have a case where the application log is in a complete wild format.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[critical] consumer.go:117 [!dt dt.trace_id=xxxxx,dt.span_id=xxxx][request_id=xxxx][session_id=][user_id=xxxxxxx]Queue: xxxxxxxx~~~Message type: createQuoteSummaryTask~~~~~~Error:~~~Code: Some Error here ~~~Message: ~~~Stack:~~~goroutine 315080&lt;/LI-CODE&gt;
&lt;P&gt;I know the format is a huge problem, however, I would like to extract a very specific piece of this log using Regex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible? I tried to insert a new DPL pattern but I couldn't understand very well if it would be possible just run a simple regex.&lt;BR /&gt;&lt;BR /&gt;What I want to do is run the following regex along with the parser command: `Error:(.*?)Message:`.&lt;BR /&gt;&lt;BR /&gt;Is this possible?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN data-contrast="auto"&gt;What to read next:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:299,&amp;quot;335559739&amp;quot;:299}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/Dynatrace-tips/TIP-1-Extracting-values-from-a-JSON-ARRAY-using-DQL/m-p/281181#M1698" target="_blank" rel="noopener"&gt;TIP#1: Extracting values from a JSON_ARRAY using DQL&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&amp;nbsp;&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/DQL/How-to-Parse-JSON-in-Dynatrace-DQL-Queries/m-p/242105" target="_blank" rel="noopener"&gt;How to Parse JSON in Dynatrace DQL Queries?&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 07:51:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Use-Regex-in-Dynatrace-DQL-Queries-for-Advanced-Filtering/m-p/245636#M889</guid>
      <dc:creator>ppaulogustavoem</dc:creator>
      <dc:date>2025-12-09T07:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: DQL Regex</title>
      <link>https://community.dynatrace.com/t5/DQL/Use-Regex-in-Dynatrace-DQL-Queries-for-Advanced-Filtering/m-p/246079#M914</link>
      <description>&lt;P&gt;You cannot use regex in DPL, but DPL is a pattern matching and parsing language which replaces regex and does the job easier.&lt;BR /&gt;&lt;BR /&gt;Actually such format is not a problem:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(content="[critical] consumer.go:117 [!dt dt.trace_id=xxxxx,dt.span_id=xxxx][request_id=xxxx][session_id=][user_id=xxxxxxx]Queue: xxxxxxxx~~~Message type: createQuoteSummaryTask~~~~~~Error:~~~Code: Some Error here ~~~Message: ~~~Stack:~~~goroutine 315080")
| parse content, "LD 'Error:' LD:error_message 'Message:'"&lt;/LI-CODE&gt;&lt;P&gt;Of course if you want to take out other fields from such a log line it is possible as well as making the pattern more precise, so it does not catch similar log lines&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1716205154747.png" style="width: 852px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19975iE23D12575AA2F38A/image-dimensions/852x179?v=v2" width="852" height="179" role="button" title="krzysztof_hoja_0-1716205154747.png" alt="krzysztof_hoja_0-1716205154747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 11:40:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Use-Regex-in-Dynatrace-DQL-Queries-for-Advanced-Filtering/m-p/246079#M914</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-05-20T11:40:33Z</dc:date>
    </item>
  </channel>
</rss>

