Nathan Wiger wrote:
> 
> I think it's cool too, I don't like the @^g and ^@G either. But I worry
> about the double-meaning of the []'s in your solution, and the fact that
> these:
> 
>    /\m[...]...\M/;
>    /\d[...]...\D/;

Well, it's not really a double meaning.  It's a set of characters, just
like '[]' always means.
Granted, the meaning between upper & lower case characters is not the
same here, but I don't think
it always is the same currently (positive/negative).

> 
> Will work so differently. Maybe another character like ()'s that takes a
> list:
> 
>    /\m(<<,[).*?\M(>>,])/;
> 
If you don't want to use [] (which limits it to single character
"para-brace-ets"),
then I"d suggest using {} as that is already established for use in with
\? type 
escapes.  

Maybe:  m/\m{(<<)|(\[)}.*?\M{(>>)|(])}/;

Essentially everything inside the {} is in-fact another pattern, and the
back-references within
match "1-for-1".  Of course, with this syntax you'd have to escape
actual braces m{\{} which I don't 
much care for...

> That solves the multiple characters problem at least. However, we still
> have a \M and \m, which isn't consistent if they're going to take
> arguments.

I'm not sure I understand your point here.


> 
> But, how about a new ?m operator?
> 
>    /(?m<<|[).*?(?M>>|])/;
> 

Let's combine yor operator with my example from above where everything
inside the (?m) or the ?(M)
fits the syntax of a RE.  

        /(?m(<<)|\[).*?(?M(>>)|(\]))

> Then the ?M matches pairs with the previous ?m, if there was one that
> was matched. The | character separates or'ed sets consistent with other
> regex patterns.

You can do that, or you can say it's done with backreferences (as noted
above)....
> 
> -Nate
> 
> David Corbin wrote:
> >
> > I never saw one comment on this, and the more I think about it, the more
> > I like it. So,
> > I thought I'd throw it back out one more time...(If I get no comments
> > this time, I'll
> > be quiet :)
> >
> > David Corbin wrote:
> > >
> > > I haven't given this a WHOLE lot of thought, so please, shoot it full
> > > of holes.
> > >
> > > I certainly like the goal of this RFC, but I dislike the idea that the
> > > specification for
> > > what chacters are going to match are specified outside of the RE.

-- 
David Corbin            
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]

Reply via email to