<?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: Negative lookahead regular expression not working in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47502#M34923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would be *very* interested in this feature as well: any news on implementation? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2012 21:05:21 GMT</pubDate>
    <dc:creator>HMarch</dc:creator>
    <dc:date>2012-05-29T21:05:21Z</dc:date>
    <item>
      <title>Negative lookahead regular expression not working</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47499#M34920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bit of an advanced regex feature, but I would like to set up a custom vulnerability signature to detect browsers (user-agent) that are not Internet Explorer. True, one could detect Firefox specifically, but there are so many different browsers in the wild that it is impossible to match them all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The regex I'm attempting therefore is: User-Agent: (?!.*MSIE).*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The regular expression would match if any browser type (user-agent) is not MS Internet Explorer, which is what I need.&lt;/P&gt;&lt;P&gt;However, PANOS 4.0.0 doesn't seem to like this syntax and returns an error:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Operation Failed:&lt;/P&gt;&lt;P&gt;-&amp;gt; signature &amp;gt; standard &amp;gt; Firefox -&amp;gt; and-condition -&amp;gt; And Condition 1 -&amp;gt; or-condition-&amp;gt; Or Condition 1 -&amp;gt; operator -&amp;gt; pattern-match -&amp;gt; pattern "User-Agent: (?!.*MSIE).* is invalid. syntax error at ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way to achieve the detection of non-MSIE browsers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 12:14:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47499#M34920</guid>
      <dc:creator>BenLassila</dc:creator>
      <dc:date>2011-03-11T12:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Negative lookahead regular expression not working</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47500#M34921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you've figured out, the answer to your question is no we don't support negative lookahead regex. I think it's doable, but it may not be supported in regex. Instead we could expose a negative flag that you can associate with a pattern in the signature. So you would first look for User-Agent, then MSIE with a negative flag, which would trigger if MSIE was not found after the User-Agent trigger. This will require some software and engine work. If this works for you, can you have your SE log a feature request and we will see where we can get it scheduled in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 07:55:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47500#M34921</guid>
      <dc:creator>fredallee</dc:creator>
      <dc:date>2011-03-15T07:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Negative lookahead regular expression not working</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47501#M34922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i have the same problem and that currently, the PAN OS 4.0.3 still doesn't support negative regexp, i would know if there is a fix coming or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for answers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 11:46:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47501#M34922</guid>
      <dc:creator>alexis_janin</dc:creator>
      <dc:date>2011-08-03T11:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Negative lookahead regular expression not working</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47502#M34923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would be *very* interested in this feature as well: any news on implementation? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 21:05:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47502#M34923</guid>
      <dc:creator>HMarch</dc:creator>
      <dc:date>2012-05-29T21:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Negative lookahead regular expression not working</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47503#M34924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, PA said implementation would have negative impact on performance.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 07:58:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/negative-lookahead-regular-expression-not-working/m-p/47503#M34924</guid>
      <dc:creator>BenLassila</dc:creator>
      <dc:date>2012-05-30T07:58:13Z</dc:date>
    </item>
  </channel>
</rss>

