<?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 Return True if Pattern is found anywhere within Text - Help in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301708#M3428</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am formulating a DPL command to return true if a pattern such as a credit card format/number exists anywhere within a piece of text.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example....&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(a = "378282246310005")
| parse a, """CREDITCARD:cc"""
| fieldsAdd hasCreditCard = isNotNull(cc)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;... this would return true, but the minute I add anything before or after it will return false. Any ideas on how to detect that pattern anywhere within a piece of text, or a log? Which is where this code/function is going to be used.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2026 15:41:49 GMT</pubDate>
    <dc:creator>badgerfifteen</dc:creator>
    <dc:date>2026-07-08T15:41:49Z</dc:date>
    <item>
      <title>Return True if Pattern is found anywhere within Text - Help</title>
      <link>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301708#M3428</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am formulating a DPL command to return true if a pattern such as a credit card format/number exists anywhere within a piece of text.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example....&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(a = "378282246310005")
| parse a, """CREDITCARD:cc"""
| fieldsAdd hasCreditCard = isNotNull(cc)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;... this would return true, but the minute I add anything before or after it will return false. Any ideas on how to detect that pattern anywhere within a piece of text, or a log? Which is where this code/function is going to be used.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2026 15:41:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301708#M3428</guid>
      <dc:creator>badgerfifteen</dc:creator>
      <dc:date>2026-07-08T15:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return True if Pattern is found anywhere within Text - Help</title>
      <link>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301712#M3429</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67521"&gt;@badgerfifteen&lt;/a&gt;&amp;nbsp;I think you just have your parse command incorrect, and you need to add LD* (Line data, optional):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(a = "x378282246310005")
| parse a, """LD* CREDITCARD:cc"""
| fieldsAdd hasCreditCard = isNotNull(cc)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2026 17:56:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301712#M3429</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2026-07-08T17:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Return True if Pattern is found anywhere within Text - Help</title>
      <link>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301737#M3432</link>
      <description>&lt;P&gt;Thanks, this works! I used this and changed and changed LD to DATA to account for log entries or pieces of text with new lines.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2026 11:06:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Return-True-if-Pattern-is-found-anywhere-within-Text-Help/m-p/301737#M3432</guid>
      <dc:creator>badgerfifteen</dc:creator>
      <dc:date>2026-07-09T11:06:57Z</dc:date>
    </item>
  </channel>
</rss>

