Graham Barr <[EMAIL PROTECTED]> writes:

> On Fri, Aug 11, 2000 at 01:47:12PM +0100, Piers Cawley wrote:
> > >   /^_/
> > > 
> > > What is that matching ?
> > 
> > We've done this. It's matching a string that begins with '_'. Which is
> > why, if you want to disambiguate you do /^{_}/ just like you do with
> > variables. 
> 
> No that won't work either. That matches the string {_}

No, \{_\} matches the string {_}. Damn, it doesn't. How annoying.
Well, it *should* be that way, and it shouldn't be too hard to make it
that way. He said hopefully...

> It is the fact that ^ is the first char of the re that causes to to be interpreted
> as a re special char.
> 
> > > So I would suggest something like one of : _ 
> > 
> > Not sure about :, but how you do distinguish between _foo =>
> > placeholder and _foo => &_foo?
> 
> Ah yes _ is out

And : is being mooted for all sorts of other stuff elsewhere. My
current thinking is that ^_ is the best of a not desperately good load
of options.

-- 
Piers

Reply via email to