Darren Duncan wrote:
> David Green wrote:
>> On 2010-08-05, at 8:27 am, Aaron Sherman wrote:
>>> On Thu, Aug 5, 2010 at 7:55 AM, Carl Mäsak <cma...@gmail.com> wrote:
>>>> I see this particular thinko a lot, though. Maybe some Perl 6 lint tool
>>>> or another will detect when you have a regex containing ^ at its start, $
>>>> at the end, | somewhere in the middle, and no [] to disambiguate.
>> 
>> I think conceptually the beginning and the end of a string feels like a
>> bracketing construct (only without symmetrical symbols).  At least that seems
>> to be my instinct.  Well, it doesn't in / ^foo | ^bar | ^qux /, but in
>> something like /^ foo|bar $/, the context immediately implies a higher
>> precedence for ^ and $.  Maybe something like // foo|bar // could work as a
>> bracketing version?
> 
> Personally, I had always considered the ^ and $ to be the lowest precedence 
> things in a pattern. 

Meta characters don't have a precedence on their on - concatenation has.

Cheers,
Moritz

Reply via email to