Re: Group list elements

2003-10-05 Thread Götz Verdieck
Hi, Cris Charley posted me the following tip: I did this with the code below, but there are even better solutions in the attachment to this post. They are from MJD quiz of the week #6. However, they don't meet the requirement that only 2 numbers in sequence should be reported seperately :-) I ma

Re: Group list elements

2003-10-02 Thread John W. Krahn
"John W. Krahn" wrote: > > GöTz Verdieck wrote: > > > > I'm looking for a solution for the following problem: > > > > This is the list I have : $kommalist ="20,21,22,23,24,25,27,28,31,32,33"; > > > > And I want to convert it into : $newlist ="20..25,27,28,31..33"; > > > > So, I only want to combin

Re: Group list elements

2003-10-02 Thread John W. Krahn
GöTz Verdieck wrote: > > Hi, Hello, > I'm looking for a solution for the following problem: > > This is the list I have : $kommalist ="20,21,22,23,24,25,27,28,31,32,33"; > > And I want to convert it into : $newlist ="20..25,27,28,31..33"; > > So, I only want to combine the elements if there a

Re: Group list elements

2003-10-02 Thread david
GöTz Verdieck wrote: > Hi, > I'm looking for a solution for the following problem: > > This is the list I have : $kommalist ="20,21,22,23,24,25,27,28,31,32,33"; > > And I want to convert it into : $newlist ="20..25,27,28,31..33"; > > So, I only want to combine the elements if there are more tha