<?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 DQL - replacing all hexadecimal pattern in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/DQL-replacing-all-hexadecimal-pattern/m-p/263552#M1474</link>
    <description>&lt;P&gt;Good morning community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there an easy way to replace any&amp;nbsp;hexadecimal&amp;nbsp; pattern from the text of a field?&lt;BR /&gt;&lt;BR /&gt;Example:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: HTTP operation failed invoking https://arturo.ciao.dynamics.com/api/data/v9.2/cchct_INTEGR_aaaa_bbbb_IN?MessageId=*&amp;amp;QueueId=2E5C906617521EDC&amp;amp;QualityOfService=ExactlyOnce with statusCode: 400.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I replace this value&amp;nbsp;2E5C906617521EDC in any log line via DQL?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 25 Nov 2024 10:43:22 GMT</pubDate>
    <dc:creator>y_buccellato</dc:creator>
    <dc:date>2024-11-25T10:43:22Z</dc:date>
    <item>
      <title>DQL - replacing all hexadecimal pattern</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-replacing-all-hexadecimal-pattern/m-p/263552#M1474</link>
      <description>&lt;P&gt;Good morning community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there an easy way to replace any&amp;nbsp;hexadecimal&amp;nbsp; pattern from the text of a field?&lt;BR /&gt;&lt;BR /&gt;Example:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: HTTP operation failed invoking https://arturo.ciao.dynamics.com/api/data/v9.2/cchct_INTEGR_aaaa_bbbb_IN?MessageId=*&amp;amp;QueueId=2E5C906617521EDC&amp;amp;QualityOfService=ExactlyOnce with statusCode: 400.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I replace this value&amp;nbsp;2E5C906617521EDC in any log line via DQL?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 10:43:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-replacing-all-hexadecimal-pattern/m-p/263552#M1474</guid>
      <dc:creator>y_buccellato</dc:creator>
      <dc:date>2024-11-25T10:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: DQL - replacing all hexadecimal pattern</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-replacing-all-hexadecimal-pattern/m-p/263607#M1477</link>
      <description>&lt;P&gt;There are &lt;EM&gt;&lt;STRONG&gt;replaceString&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;replacePattern&lt;/STRONG&gt; &lt;/EM&gt;functions which can be helpful. I guess you want to replace not this specific value (&lt;SPAN&gt;2E5C906617521EDC), but similarly looking numbers, so the second one will be more suited.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please note that besides example you gave there are many more hex numbers in the log line, so very simple pattern would replace too much:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1732554210430.png" style="width: 851px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24834i94BEC29289505D7B/image-dimensions/851x215?v=v2" width="851" height="215" role="button" title="krzysztof_hoja_0-1732554210430.png" alt="krzysztof_hoja_0-1732554210430.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To make it work we need to tell parser more, e.g. what is the surrounding of the number, e.g.:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(content="""com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: HTTP operation failed invoking https://arturo.ciao.dynamics.com/api/data/v9.2/cchct_INTEGR_aaaa_bbbb_IN?MessageId=*&amp;amp;QueueId=2E5C906617521EDC&amp;amp;QualityOfService=ExactlyOnce with statusCode: 400.""")
| fieldsAdd content_fixed=replacePattern(content, "'QueueId='HEXLONG", "QueueId=*")&lt;/LI-CODE&gt;&lt;P&gt;The result look like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_1-1732554366740.png" style="width: 861px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24835i9F7BD7AF495E3F77/image-dimensions/861x233?v=v2" width="861" height="233" role="button" title="krzysztof_hoja_1-1732554366740.png" alt="krzysztof_hoja_1-1732554366740.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>Mon, 25 Nov 2024 17:06:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-replacing-all-hexadecimal-pattern/m-p/263607#M1477</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-11-25T17:06:27Z</dc:date>
    </item>
  </channel>
</rss>

