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/;

Will work so differently. Maybe another character like ()'s that takes a
list:

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

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.

But, how about a new ?m operator?

   /(?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.

-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.

Reply via email to