<?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 Parse logs to extract field by combined regex in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276389#M2023</link>
    <description>&lt;DIV class=""&gt;Hi, Community!&lt;/DIV&gt;
&lt;DIV class=""&gt;Could you please help with field extraction?&lt;/DIV&gt;
&lt;DIV class=""&gt;I have entry like below and need to extract&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MDCID=D8227-6494143177361398674&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to the separate field&lt;/DIV&gt;
&lt;PRE&gt;data record(content = "-2025-05-01 23:02:58.960 INFO MDCID=D8227-6494143177361398674 [,] 1 --- [platformRequestMessageListenerContainer-9] AccrualLog: ABC Return: &amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&amp;gt; &amp;lt;pfx6:ABCPublisher ")&lt;/PRE&gt;
&lt;DIV class=""&gt;General rules are:&lt;/DIV&gt;
&lt;OL class=""&gt;
&lt;LI&gt;Starts with exact&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MDCID&lt;/LI&gt;
&lt;LI&gt;Contains uppercase, numbers, = (equal sign), - (dash sign)&lt;/LI&gt;
&lt;LI&gt;Has minimal length of 12 (e.g.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MDCID=A12-23)&lt;/LI&gt;
&lt;LI&gt;Ends before closest space after&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class=""&gt;But I struggling with creating parse expression, as not sure how to combine several patterns to single column in output. E.g.&lt;/DIV&gt;
&lt;LI-CODE lang="markup"&gt;data record(content = "-2025-05-01 23:02:58.960 INFO MDCID=D8227-6494143177361398674 [,] 1 --- [platformRequestMessageListenerContainer-9] AccrualLog: ABC Return: &amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&amp;gt; &amp;lt;pfx6:ABCPublisher ") 
| parse content, "LD ['MDICD='{*}0-9{*}a-z]{12,100}:id LD"&lt;/LI-CODE&gt;
&lt;DIV class=""&gt;gives me&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;6494143177361398674&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;so 'MDICD=' is ignored. Could you please help to create correct expression? Seems like I'm using `{*}` in a wrong way (just saw it in some example but without explanation)&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;Also appreciate if you can share detailed regular expression for Dynatrace guide, as links like this&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language" target="_blank" rel="noopener noreferrer"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;do not cover cases with combined expressions (like "MDCID" and "=" and "A-Z" ...)&lt;/DIV&gt;</description>
    <pubDate>Mon, 05 May 2025 07:32:09 GMT</pubDate>
    <dc:creator>ArtemR</dc:creator>
    <dc:date>2025-05-05T07:32:09Z</dc:date>
    <item>
      <title>Parse logs to extract field by combined regex</title>
      <link>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276389#M2023</link>
      <description>&lt;DIV class=""&gt;Hi, Community!&lt;/DIV&gt;
&lt;DIV class=""&gt;Could you please help with field extraction?&lt;/DIV&gt;
&lt;DIV class=""&gt;I have entry like below and need to extract&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MDCID=D8227-6494143177361398674&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to the separate field&lt;/DIV&gt;
&lt;PRE&gt;data record(content = "-2025-05-01 23:02:58.960 INFO MDCID=D8227-6494143177361398674 [,] 1 --- [platformRequestMessageListenerContainer-9] AccrualLog: ABC Return: &amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&amp;gt; &amp;lt;pfx6:ABCPublisher ")&lt;/PRE&gt;
&lt;DIV class=""&gt;General rules are:&lt;/DIV&gt;
&lt;OL class=""&gt;
&lt;LI&gt;Starts with exact&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MDCID&lt;/LI&gt;
&lt;LI&gt;Contains uppercase, numbers, = (equal sign), - (dash sign)&lt;/LI&gt;
&lt;LI&gt;Has minimal length of 12 (e.g.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;MDCID=A12-23)&lt;/LI&gt;
&lt;LI&gt;Ends before closest space after&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class=""&gt;But I struggling with creating parse expression, as not sure how to combine several patterns to single column in output. E.g.&lt;/DIV&gt;
&lt;LI-CODE lang="markup"&gt;data record(content = "-2025-05-01 23:02:58.960 INFO MDCID=D8227-6494143177361398674 [,] 1 --- [platformRequestMessageListenerContainer-9] AccrualLog: ABC Return: &amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&amp;gt; &amp;lt;pfx6:ABCPublisher ") 
| parse content, "LD ['MDICD='{*}0-9{*}a-z]{12,100}:id LD"&lt;/LI-CODE&gt;
&lt;DIV class=""&gt;gives me&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;6494143177361398674&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;so 'MDICD=' is ignored. Could you please help to create correct expression? Seems like I'm using `{*}` in a wrong way (just saw it in some example but without explanation)&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;Also appreciate if you can share detailed regular expression for Dynatrace guide, as links like this&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language" target="_blank" rel="noopener noreferrer"&gt;https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;do not cover cases with combined expressions (like "MDCID" and "=" and "A-Z" ...)&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 May 2025 07:32:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276389#M2023</guid>
      <dc:creator>ArtemR</dc:creator>
      <dc:date>2025-05-05T07:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Parse logs to extract field by combined regex</title>
      <link>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276393#M2024</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/89930"&gt;@ArtemR&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to use &lt;A href="https://docs.dynatrace.com/docs/shortlink/dpl-pattern-expression-macros" target="_self"&gt;macros&lt;/A&gt;, please have a look at the example&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;data record(content = "-2025-05-01 23:02:58.960 INFO MDCID=D8227-6494143177361398674 [,] 1 --- [platformRequestMessageListenerContainer-9] AccrualLog: ABC Return: &amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?&amp;gt; &amp;lt;pfx6:ABCPublisher ")
| parse content, """$id = 'MDCID=' [A-Z0-9=-]{6,};
LD $id:id"""&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 10:06:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276393#M2024</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2025-05-02T10:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Parse logs to extract field by combined regex</title>
      <link>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276402#M2025</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38283"&gt;@sinisa_zubic&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great, I believe macros is what I need. It's working, thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 13:03:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Parse-logs-to-extract-field-by-combined-regex/m-p/276402#M2025</guid>
      <dc:creator>ArtemR</dc:creator>
      <dc:date>2025-05-02T13:03:31Z</dc:date>
    </item>
  </channel>
</rss>

