home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,064 of 2,753   
   Joachim Durchholz to John Levine   
   Re: Precedence Rules for '$' and '^'   
   13 Sep 07 23:06:50   
   
   From: jo@durchholz.org   
      
   John Levine wrote:   
   > [I don't understand it either.  My understanding of typical REs is   
   > that they special case ^ at the beginning of a pattern or chunk   
   > that could match at the beginning, and $ at the end. -John]   
      
   That's just implementation; the OP was after precedences.   
      
   Assigning a precedence to ^ and $ does make sense. For example,   
      
      ^asd|jkl   
      
   could mean "asd at the beginning of the text, or jkl anywhere in the   
   text", or it could mean "asd or jkl at the beginning of the text".   
   PCRE says it's either ^asd or jkl, so it assigns a higher precedence to   
   ^ than to |.   
      
   Regards,   
   Jo   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca