<?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 Need Help with String Extraction in DPL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279677#M2218</link>
    <description>&lt;DIV&gt;Hello Team,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would like to extract only values matching the pattern *appdevgw-***&amp;nbsp; from below sample logs&amp;nbsp; data and assign them to a new field named HostName with capital letters, for example: HostName=DAPPDEVGW-001. Is that possible using DPL ?&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;DATA record(host.name="dappdevgw-001.phx.ad.company.com", message= "this is a test message 1"),&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; record(host.name="pappdevgw-006.phx.ad.company.com", message= "this is a test message 2"),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; record(host.name="bappdevgw-007.phx.ad.company.com", message= "this is a test message 3")&lt;/SPAN&gt;&lt;/DIV&gt;Br,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 Jun 2025 22:44:15 GMT</pubDate>
    <dc:creator>Akhil-Jayendran</dc:creator>
    <dc:date>2025-06-17T22:44:15Z</dc:date>
    <item>
      <title>Need Help with String Extraction in DPL</title>
      <link>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279677#M2218</link>
      <description>&lt;DIV&gt;Hello Team,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would like to extract only values matching the pattern *appdevgw-***&amp;nbsp; from below sample logs&amp;nbsp; data and assign them to a new field named HostName with capital letters, for example: HostName=DAPPDEVGW-001. Is that possible using DPL ?&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;DATA record(host.name="dappdevgw-001.phx.ad.company.com", message= "this is a test message 1"),&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; record(host.name="pappdevgw-006.phx.ad.company.com", message= "this is a test message 2"),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; record(host.name="bappdevgw-007.phx.ad.company.com", message= "this is a test message 3")&lt;/SPAN&gt;&lt;/DIV&gt;Br,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Jun 2025 22:44:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279677#M2218</guid>
      <dc:creator>Akhil-Jayendran</dc:creator>
      <dc:date>2025-06-17T22:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with String Extraction in DPL</title>
      <link>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279678#M2219</link>
      <description>&lt;P&gt;I think I found it in a different way. without DPL.&lt;BR /&gt;&lt;BR /&gt;DATA record(host.name="dappdevgw-001.phx.ad.company.com", message= "this is a test message 1"),&lt;BR /&gt;record(host.name="pappdevgw-006.phx.ad.company.com", message= "this is a test message 2"),&lt;BR /&gt;record(host.name="bappdevgw-007.phx.ad.company.com", message= "this is a test message 3")&lt;BR /&gt;| fieldsAdd HostName = splitString(host.name, ".")&lt;BR /&gt;| fieldsAdd HostName =arrayFirst(HostName)&lt;BR /&gt;| fieldsAdd HostName= upper(HostName)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But&amp;nbsp;I’m curious — is this possible with DPL?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 01:36:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279678#M2219</guid>
      <dc:creator>Akhil-Jayendran</dc:creator>
      <dc:date>2025-06-18T01:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with String Extraction in DPL</title>
      <link>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279700#M2220</link>
      <description>&lt;P&gt;DPL is only for extraction, not for adapting the string itself. You need to compare it to regular expressions. This means that if you want to do more than just matching/searching and extracting a string, you will need a DQL statement.&lt;/P&gt;&lt;P&gt;A solution with DPL could be:&lt;/P&gt;&lt;PRE&gt;DATA record(host.name="dappdevgw-001.phx.ad.company.com", message= "this is a test message 1"),&lt;BR /&gt;record(host.name="pappdevgw-006.phx.ad.company.com", message= "this is a test message 2"),&lt;BR /&gt;record(host.name="bappdevgw-007.phx.ad.company.com", message= "this is a test message 3")&lt;BR /&gt;| parse `host.name`, """DATA?&lt;BR /&gt;(DATA{1}&lt;BR /&gt;'appdevgw-'&lt;BR /&gt;DATA{3}):HostName&lt;BR /&gt;DATA"""&lt;BR /&gt;| fieldsAdd HostName = upper(HostName)&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jun 2025 08:43:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Need-Help-with-String-Extraction-in-DPL/m-p/279700#M2220</guid>
      <dc:creator>jmarbaix</dc:creator>
      <dc:date>2025-06-18T08:43:31Z</dc:date>
    </item>
  </channel>
</rss>

