<?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: Regarding Regular Expression in Perl in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432769#M682579</link>
    <description>Argh, the second condition in the double-condition should really be written as:&lt;BR /&gt;&lt;BR /&gt; !m{Lo0$|Fa0/0$}&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt; !m{(Lo0|Fa0/0)$}&lt;BR /&gt;&lt;BR /&gt;If you want to see a line which has an "Lo0", but does not end in it. Like:&lt;BR /&gt;&lt;BR /&gt;" Node Down Root Cause: DEL-DAV Lo0 blah"&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 04 Jun 2009 10:56:01 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2009-06-04T10:56:01Z</dc:date>
    <item>
      <title>Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432766#M682576</link>
      <description>Hi Experts,&lt;BR /&gt;&lt;BR /&gt;Trying to write a RE in perl for the following patterns,&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down Root Cause: DEL-DAV Lo0"&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down  Cause: TIR-VAK Lo0"&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down Problem Cause: BLR-VHS Fa0/0"&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down interface Cause: VIZ-REG Se0/0"&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down Root Cause: KOL-RGH BR1/0:1"&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down Root Cause: BHU-TAN Se0"&lt;BR /&gt;&lt;BR /&gt;"OV_Node_Down, Status Alarms: Node Down Root Cause: KOL-DUR Fa0/0"&lt;BR /&gt;&lt;BR /&gt;Now my conditions is,&lt;BR /&gt;&lt;BR /&gt;Need to check for "Node Down" and it should not contain Lo0, Fa0/0 at the end of the string&lt;BR /&gt;&lt;BR /&gt;Tried the following RE, but it is not working for all strings.&lt;BR /&gt;&lt;BR /&gt;/^.*Node Down.*(^Lo0)|(^Fa0/0)$/&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Raghu&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jun 2009 05:10:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432766#M682576</guid>
      <dc:creator>Raghu Chikkamenahalli</dc:creator>
      <dc:date>2009-06-04T05:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432767#M682577</link>
      <description>if (m{Node_Down} &amp;amp;&amp;amp; !m{Lo0, Fa0/0$}) {&lt;BR /&gt;    ...&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;If you insist on a single re&lt;BR /&gt;&lt;BR /&gt;m{Node_Down.*$(?</description>
      <pubDate>Thu, 04 Jun 2009 09:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432767#M682577</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2009-06-04T09:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432768#M682578</link>
      <description>Hmm, Merijn, Neither seems to work for me IF I interpret Raghu's &lt;LO0&gt; to mean &lt;NOT&gt;.&lt;BR /&gt;Admittedly he did not write that, but his trial solution suggests it.&lt;BR /&gt;&lt;BR /&gt;The ", " is not a magical new operator is it?&lt;BR /&gt; &lt;BR /&gt;The "?&lt;/NOT&gt;&lt;/LO0&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:48:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432768#M682578</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-06-04T10:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432769#M682579</link>
      <description>Argh, the second condition in the double-condition should really be written as:&lt;BR /&gt;&lt;BR /&gt; !m{Lo0$|Fa0/0$}&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt; !m{(Lo0|Fa0/0)$}&lt;BR /&gt;&lt;BR /&gt;If you want to see a line which has an "Lo0", but does not end in it. Like:&lt;BR /&gt;&lt;BR /&gt;" Node Down Root Cause: DEL-DAV Lo0 blah"&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:56:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432769#M682579</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-06-04T10:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432770#M682580</link>
      <description>&lt;!--!*#--&gt;I interpreted the text, not the data. You are right in that he wants two patters.&lt;BR /&gt;&lt;BR /&gt;The zeero-width negative-look-behind only works if both patters are of equal length.&lt;BR /&gt;&lt;BR /&gt;So, the correct solution would then be&lt;BR /&gt;&lt;BR /&gt;if (m{Node_Down} &amp;amp;&amp;amp; !m{(?:Lo0|Fa0/0)$}) {&lt;BR /&gt;    ...&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 04 Jun 2009 14:12:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432770#M682580</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2009-06-04T14:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432771#M682581</link>
      <description>Raghu,&lt;BR /&gt;&lt;BR /&gt;The assigned points suggests that the suggested solutions did not provide an answer what you were looking for.&lt;BR /&gt;&lt;BR /&gt;Care to articulate why not?&lt;BR /&gt;&lt;BR /&gt;Are the double quotes part of the actual data lines? I assumed in my olution they were there for illustrating the input data. Easy enough to accommodate for those, if need be.&lt;BR /&gt;&lt;BR /&gt;For better help you may want to attach a (short) simple TEXT file with actual data lines first, and then a section highlighting the desired, and undesired matches.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jun 2009 14:13:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432771#M682581</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-06-04T14:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432772#M682582</link>
      <description>Hello Hein,&lt;BR /&gt;&lt;BR /&gt;first of all thanks a lot for your lightning response and apologies for not giving the requirements clearly.&lt;BR /&gt;&lt;BR /&gt;I was looking for a sigle RE which will match a message containg Node Down" and not conating "Fa0/0 or Lo0".&lt;BR /&gt;&lt;BR /&gt;The catch with the solution &lt;BR /&gt;m{Node Down.*\s[^LF][^oa]\d\S*$}&lt;BR /&gt;&lt;BR /&gt;was it is not accepting Lxx for Example:La1, which was supposed match.&lt;BR /&gt;&lt;BR /&gt;in anycase your solution helped me to arrive at the required RE&lt;BR /&gt;&lt;BR /&gt;^.*Node Down.*:\s.*\s(?!Lo0)(?!Fa0\/0).{3,}$&lt;BR /&gt;&lt;BR /&gt;thanks again for you assistance.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Raghu</description>
      <pubDate>Fri, 05 Jun 2009 04:47:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432772#M682582</guid>
      <dc:creator>Raghu Chikkamenahalli</dc:creator>
      <dc:date>2009-06-05T04:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Regular Expression in Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432773#M682583</link>
      <description>m{[^LF][^oa]\d\S*$}&lt;BR /&gt;&lt;BR /&gt;Will match a character other than L or F&lt;BR /&gt;Followed by a character other than o or a&lt;BR /&gt;followed by a digit&lt;BR /&gt;followed by any number of non-whitespace&lt;BR /&gt;followed by the end of the string (option new-line allowed)&lt;BR /&gt;&lt;BR /&gt;This will obviously match too much. Way too much&lt;BR /&gt;&lt;BR /&gt;/^.*Node Down.*(^Lo0)|(^Fa0/0)$/&lt;BR /&gt;&lt;BR /&gt;is wrong that does never match, as the syntax is not legal&lt;BR /&gt;&lt;BR /&gt;It would be almost impossible to create what you want in a *legible* single regular expression.&lt;BR /&gt;&lt;BR /&gt;sticking to a combined version is so much safer and easier to maintain&lt;BR /&gt;&lt;BR /&gt;m{Node Down} &amp;amp;&amp;amp; !m{(?: Lo0 | Fa0/0 )$}x&lt;BR /&gt;&lt;BR /&gt;is IMHO the only way to go if you want to understand what you did 3 months from now&lt;BR /&gt;&lt;BR /&gt;$ perldoc perlre&lt;BR /&gt;&lt;BR /&gt;Will give you lots of learning stuff&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 05 Jun 2009 13:22:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-regular-expression-in-perl/m-p/4432773#M682583</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2009-06-05T13:22:40Z</dc:date>
    </item>
  </channel>
</rss>

