http://d.puremagic.com/issues/show_bug.cgi?id=6383


pomp...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pomp...@gmail.com


--- Comment #5 from pomp...@gmail.com 2011-12-21 00:38:37 PST ---
I think this would be very useful.(In reply to comment #2)
> (In reply to comment #1)
> > Sorry, this is not correct:
> > 
> > auto (start,end) = array(match(r, r"^(-?\d+)(-?(-?\d+))?$").captures);
> > auto (start,end) = match(r, r"^(-?\d+)(-?(-?\d+))?$").captures;
> 
> I'm puzzled, in this case captures contain way more then 2 strings:
> 0 - whole match
> 1 - (-?\d+)
> 2 - (-?(-?\d+))?
> 3 - (-?\d+)

So why couldn't "start" and "end" unpack the whole match and (-?\d+) and ignore
the last two?

I totally want to see unpacking in D2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to