On Tue, Sep 05, 2000 at 02:12:23PM -0400, Eric Roode wrote:
> Unfortunately, as Richard Proctor pointed out, ?m is taken. Perhaps
> (?[list|of|openers) and (?]list|of|closers) ?
That breaks the visual meaning of "|" as alternation if the RE engine
is to be smart enough to match the closers with the right openers.
Plus, it leaves it up to the programmer to get his openers and closers
in the right position in the list which seems error prone to me.
How about these?
/(?[open0,close0|open1,close1)...(?])/ # preserves alternation
/(?[open0,close0,open1,close1)...(?])/
/(?[ open0 => close0, open1 => close1)...(?])/
/(?[open0 ]close0 [open1 ]close1)...(?])/
/(?[open0.close0 open1.close1)...(?])/
Blah! I see no good short syntax for this. Is it really that common
an operation to match paired delimiters (SGML and its progeny not
withstanding) ? I mean, we can already do it in the language, why do
we want a shortcut?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]