<?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: Regular Expression Fail in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13008#M9529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your assistance rmonvon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//rr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Dec 2011 16:16:27 GMT</pubDate>
    <dc:creator>rroberts</dc:creator>
    <dc:date>2011-12-22T16:16:27Z</dc:date>
    <item>
      <title>Regular Expression Fail</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13004#M9525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I keep getting the following error "&lt;STRONG&gt;is invalid. pattern must be at least 7 bytes&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example match: &lt;STRONG&gt;378282246310005&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How I would normally match via regex: &lt;STRONG&gt;.*[3][47][0-9]{13}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How I am interpreting Palo Alto wants me to write it: &lt;STRONG&gt;.*(3)[47].*([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have tried at least a dozen variations of regexs, all pass the logic test but the PA appliance keeps giving me the same error.&amp;nbsp; I thought I was going crazy so I had several colleagues verify my logic and they agree it's correct.&amp;nbsp; If it was a syntax error, it would say as much but it is obviously failing the verification of the 7 byte requirement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What gives and why the limited and inefficient regex support?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Software Version:&lt;/STRONG&gt;&lt;STRONG&gt; &lt;STRONG&gt;4.0.5&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//rr&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 23:27:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13004#M9525</guid>
      <dc:creator>rroberts</dc:creator>
      <dc:date>2011-12-21T23:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Fail</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13005#M9526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our custom signature requires a minimum 7-byte fixed pattern (i.e. 7-bytes anchor) to be specified.&amp;nbsp; To match 378282246310005, we may pick 3782822 as the anchor so the complete pattern may look like 3782822[0-9][0-9][0-9][0-9][0-9][0-9][0-9].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you trying to match, credit card numbers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 14:54:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13005#M9526</guid>
      <dc:creator>rmonvon</dc:creator>
      <dc:date>2011-12-22T14:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Fail</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13006#M9527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At least I understand why it is failing now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The modulus 10 algorithm that PA uses by default seems to produce quite a few false positives and makes it difficult to find meaningful data.&amp;nbsp; I've written regular expressions for all known credit card types to be very specific in order to avoid false positives. This "7-byte anchor" requirement limits the flexibility of the appliances, in some cases there is no possible way to know that much of the data beforehand.&amp;nbsp;&amp;nbsp; Why would Palo Alto Networks only allow a subset of regex constants and operators, and place such stringent requirements on data filtering?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//rr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 15:22:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13006#M9527</guid>
      <dc:creator>rroberts</dc:creator>
      <dc:date>2011-12-22T15:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Fail</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13007#M9528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We use the modulus 10 algorithm as the method is widely employed by the credit card industry.&amp;nbsp; If you're seeing a fair amount of false positives, may I suggest you open a support case to have it investigated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree the 7-byte anchor does place a limitation on the regex pattern.&amp;nbsp; Factors contributing to this include resource constraints, feature is supported acorss all PA models, &amp;amp; maintaining performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 15:43:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13007#M9528</guid>
      <dc:creator>rmonvon</dc:creator>
      <dc:date>2011-12-22T15:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Fail</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13008#M9529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your assistance rmonvon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//rr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 16:16:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/regular-expression-fail/m-p/13008#M9529</guid>
      <dc:creator>rroberts</dc:creator>
      <dc:date>2011-12-22T16:16:27Z</dc:date>
    </item>
  </channel>
</rss>

