in reply to break-down ranges

Like so?

print for map{ /(\D+)?(\d+)-\1?(\d+)/ ? ( map{ ($1||'') . $_ } $2 .. $3 ) : $_ } split ';', 'ph1-3;25;t3;t47-t50;d4-6';; ph1 ph2 ph3 25 t3 t47 t48 t49 t50 d4 d5 d6

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: break-down ranges
by locked_user sundialsvc4 (Abbot) on Jul 04, 2011 at 12:54 UTC

    Smart-ass...   ;-)   :-D   ;-)   :-D

    Just another demo of why Perl is called “the Swiss Army Knife® of Computer Programming.”   (And why some programmers are referred to as, “The Gods.”)

    Very slick, my friend.   Very.