<?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: Replace number with generic string in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Replace-number-with-generic-string/m-p/213813#M35</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47555"&gt;@educampver&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;you can use the&amp;nbsp;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;parse&lt;/CODE&gt;&amp;nbsp;command to extract the part before and after the pattern, and &lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;append&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to join the parts, including a replacement string:&lt;/P&gt;
&lt;PRE&gt;data record(a="/v1/shipments/customer-picked-up"), record(a="/v1/shipments/containers/100000011782/hold-locations"), record(a="/v1/shipments/2023051723300410000038807/assigned-user")&lt;BR /&gt;| parse a, "'/v1/' LD:b int LD:c"&lt;BR /&gt;| fields result = if(isNull(b), a, else:concat(b,"[n]",c))&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefan_eggersto_0-1685616880988.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/12029iB9377F8E82AA2666/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stefan_eggersto_0-1685616880988.png" alt="stefan_eggersto_0-1685616880988.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 10:54:46 GMT</pubDate>
    <dc:creator>stefan_eggersto</dc:creator>
    <dc:date>2023-06-01T10:54:46Z</dc:date>
    <item>
      <title>Replace number with generic string</title>
      <link>https://community.dynatrace.com/t5/DQL/Replace-number-with-generic-string/m-p/213778#M27</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;can I replace a numeric (or other pattern) string with a generic one? For example, my DQL query returns:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/v1/shipments/customer-picked-up
/v1/shipments/containers/100000011782/hold-locations
/v1/shipments/2023051723300410000038807/assigned-user&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;But I'd like to format them into something like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/v1/shipments/customer-picked-up
/v1/shipments/containers/[n]/hold-locations
/v1/shipments/[n]/assigned-user&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 06:55:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Replace-number-with-generic-string/m-p/213778#M27</guid>
      <dc:creator>educampver</dc:creator>
      <dc:date>2023-06-01T06:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Replace number with generic string</title>
      <link>https://community.dynatrace.com/t5/DQL/Replace-number-with-generic-string/m-p/213813#M35</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47555"&gt;@educampver&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;you can use the&amp;nbsp;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;parse&lt;/CODE&gt;&amp;nbsp;command to extract the part before and after the pattern, and &lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;append&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to join the parts, including a replacement string:&lt;/P&gt;
&lt;PRE&gt;data record(a="/v1/shipments/customer-picked-up"), record(a="/v1/shipments/containers/100000011782/hold-locations"), record(a="/v1/shipments/2023051723300410000038807/assigned-user")&lt;BR /&gt;| parse a, "'/v1/' LD:b int LD:c"&lt;BR /&gt;| fields result = if(isNull(b), a, else:concat(b,"[n]",c))&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefan_eggersto_0-1685616880988.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/12029iB9377F8E82AA2666/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stefan_eggersto_0-1685616880988.png" alt="stefan_eggersto_0-1685616880988.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 10:54:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Replace-number-with-generic-string/m-p/213813#M35</guid>
      <dc:creator>stefan_eggersto</dc:creator>
      <dc:date>2023-06-01T10:54:46Z</dc:date>
    </item>
  </channel>
</rss>

