<?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: Regex in DQL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Regex-in-DQL/m-p/273460#M1859</link>
    <description>&lt;P&gt;Pure Regex is not an option currently. However, you can use the &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/string-functions#matchesPattern" target="_self"&gt;matchesPattern()&lt;/A&gt; function in a filter to match against events which patch a particular &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language" target="_self"&gt;DPL&lt;/A&gt; pattern. In the example code below, we're looking for the equivalent the following of regex pattern: &lt;EM&gt;.*EX\d{4}S.*&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| filter matchesPattern(content,"LD? 'EX' DIGIT{4} 'S' LD?")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Mar 2025 13:35:47 GMT</pubDate>
    <dc:creator>marco_irmer</dc:creator>
    <dc:date>2025-03-25T13:35:47Z</dc:date>
    <item>
      <title>Regex in DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Regex-in-DQL/m-p/273446#M1858</link>
      <description>&lt;P&gt;Is it possible to filter a contents of a log for a particular set of letters using regex?&amp;nbsp;&lt;BR /&gt;Example is that we are looking for any contents that have EX****S where the * are random numbers.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;MatchesPhrase does not work exactly as we would expect. As shown below the filter will get the log lines we want but also other log lines where the *S matches.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| filter matchesPhrase(content, " EX*") and matchesPhrase(content, "*S ")&lt;BR /&gt;&lt;BR /&gt;Are we able to use regex to match for any numbers between the set of letters we're looking for?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 12:36:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Regex-in-DQL/m-p/273446#M1858</guid>
      <dc:creator>Frazzle</dc:creator>
      <dc:date>2025-03-25T12:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regex in DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Regex-in-DQL/m-p/273460#M1859</link>
      <description>&lt;P&gt;Pure Regex is not an option currently. However, you can use the &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/string-functions#matchesPattern" target="_self"&gt;matchesPattern()&lt;/A&gt; function in a filter to match against events which patch a particular &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language" target="_self"&gt;DPL&lt;/A&gt; pattern. In the example code below, we're looking for the equivalent the following of regex pattern: &lt;EM&gt;.*EX\d{4}S.*&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| filter matchesPattern(content,"LD? 'EX' DIGIT{4} 'S' LD?")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 13:35:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Regex-in-DQL/m-p/273460#M1859</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-03-25T13:35:47Z</dc:date>
    </item>
  </channel>
</rss>

