XP is just a number | |
PerlMonks |
Re: List-to-Range generationby chipmunk (Parson) |
on Jun 12, 2001 at 02:55 UTC ( [id://87672]=note: print w/replies, xml ) | Need Help?? |
Woops, it also converts (11,2,3) to "11-3" and (1,2,30) to "1-30". :)
Here's one way to fix it: The negative look-behind at the beginning and the negative look-ahead near the end prevent the regex from matching only part of a number, like the second 1 in 11 or the 3 in 30.
In Section
Cool Uses for Perl
|
|