<?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 egrep issue in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402810#M863176</link>
    <description>hello all, &lt;BR /&gt;so i got the unfortunate task of&lt;BR /&gt;debugging a former employees code&lt;BR /&gt;and came across an unusual piece that&lt;BR /&gt;has me quite complexed (not used to this - im an GUI developer by trade but cutbacks leave us in new worlds). &lt;BR /&gt;&lt;BR /&gt;can anyone here, enlighten me as to what this is trying to match?    &lt;BR /&gt;&lt;BR /&gt;^(a(cj)+)\1*$&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;any suggestions or thoughts? &lt;BR /&gt;spent all day discussing it with another developer and we cant figure what its trying to match. &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 18 Oct 2004 16:53:21 GMT</pubDate>
    <dc:creator>eric davis_1</dc:creator>
    <dc:date>2004-10-18T16:53:21Z</dc:date>
    <item>
      <title>egrep issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402810#M863176</link>
      <description>hello all, &lt;BR /&gt;so i got the unfortunate task of&lt;BR /&gt;debugging a former employees code&lt;BR /&gt;and came across an unusual piece that&lt;BR /&gt;has me quite complexed (not used to this - im an GUI developer by trade but cutbacks leave us in new worlds). &lt;BR /&gt;&lt;BR /&gt;can anyone here, enlighten me as to what this is trying to match?    &lt;BR /&gt;&lt;BR /&gt;^(a(cj)+)\1*$&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;any suggestions or thoughts? &lt;BR /&gt;spent all day discussing it with another developer and we cant figure what its trying to match. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2004 16:53:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402810#M863176</guid>
      <dc:creator>eric davis_1</dc:creator>
      <dc:date>2004-10-18T16:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: egrep issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402811#M863177</link>
      <description>This would match a line&lt;BR /&gt; &lt;BR /&gt;acjcjcjcjacjcjcjcjcjcj&lt;BR /&gt; &lt;BR /&gt;Basically an "a" followed by a string of "cj" repeated. The "\1" means repeat from the first "(" or "a(cj)+". &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 18 Oct 2004 16:56:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402811#M863177</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-10-18T16:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: egrep issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402812#M863178</link>
      <description>A detail breakdown-&lt;BR /&gt;&lt;BR /&gt;^  Matches start of line&lt;BR /&gt;() A grouping definition&lt;BR /&gt;+ Matches at least one or more of pattern&lt;BR /&gt;\1 Repeats on first () enclosed pattern&lt;BR /&gt;* Matches zero or more of pattern&lt;BR /&gt;$ Matches end of line&lt;BR /&gt; &lt;BR /&gt;The smallest match would be-&lt;BR /&gt;acj&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2004 17:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402812#M863178</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-10-18T17:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: egrep issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402813#M863179</link>
      <description>ok so 1 a followed by 1 or more cj's&lt;BR /&gt;and repeated?&lt;BR /&gt;&lt;BR /&gt;the number of cj's between a's can be &lt;BR /&gt;1 or greater?&lt;BR /&gt;&lt;BR /&gt;the * doesnt encompass the entire expression? allowing for an empty string&lt;BR /&gt;&lt;BR /&gt;and the \1 applies to the entire expression&lt;BR /&gt;a(cj) not just the a? &lt;BR /&gt;&lt;BR /&gt;so since the entire expression &lt;BR /&gt;(a(cj)+) is followed by the \1&lt;BR /&gt;it is referring to the entire thing&lt;BR /&gt;not just the a&lt;BR /&gt;&lt;BR /&gt;if it were \2 then it would refer only to &lt;BR /&gt;the (cj)+ part correct?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i think this means im winning a lunch&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2004 17:14:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402813#M863179</guid>
      <dc:creator>eric davis_1</dc:creator>
      <dc:date>2004-10-18T17:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: egrep issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402814#M863180</link>
      <description>Yes \1 is the entire (a(cj)+). And yes \2 would refer only to (cj). The * binds tight to the \1, so only zero or more of the whole thing will be generated.&lt;BR /&gt; &lt;BR /&gt;With out the \1 their, the pattern could match an empty line also.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 18 Oct 2004 17:22:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/egrep-issue/m-p/3402814#M863180</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-10-18T17:22:07Z</dc:date>
    </item>
  </channel>
</rss>

