2006/9/22, Patrick R. Michaud <[EMAIL PROTECTED]>:
Out of curiosity, why not:

    /<foo> bar bar $<xyz>:=(<foo>+)/

and then one can easily look at $<xyz>.from and $<xyz>.to, as well
as get to the arrayed elements?  (There are other possibilities as
well.)

I'm not arguing in favor of or against the proposal, just pointing
out that there are ways in the existing scheme to get at what is
wanted.
This aliasing would still work:

   /<foo> bar bar $<xyz>:=(<foo>+)/

 $<foo>[0]   - match
 $<xyz>[]  - array of match
 $<xyz>[0]  - match
 ~$<xyz>  - stringified capture

I've been using aliasing a few times, and mostly exactly in this situation,
so I thought it would be nice to have a way to express this idea with
fewer words:

    /<foo> bar bar <foo>+/

 $<foo>[0]   - match
 $<foo>[1;*]  - array of match
 $<foo>[1;0]  - match
 ~$<foo>[1]  - stringified capture

OTOH, you lose ' @all_foo = $<foo> ', but maybe ' @all_foo = $<foo>[]
' could be overloaded to the old behaviour.

Anyway, it's just a thought.

thanks!
- Flavio S. Glock

Reply via email to