Clever way of sorting strings containing integers?

2008-10-09 Thread Holger
I tried to do this elegantly, but did not come up with a good solution Sort strings like foo1bar2 foo10bar10 foo2bar3 foo10bar2 So that they come out: foo1bar2 foo2bar3 foo10bar2 foo10bar10 I.e. isolate integer parts and sort them according to integer value. Thx Holger --

Re: Clever way of sorting strings containing integers?

2008-10-09 Thread Holger
On 9 Okt., 09:41, Holger [EMAIL PROTECTED] wrote: I tried to do this elegantly, but did not come up with a good solution Sort strings like foo1bar2 foo10bar10 foo2bar3 foo10bar2 So that they come out: foo1bar2 foo2bar3 foo10bar2 foo10bar10 I.e. isolate integer parts and sort them

Re: Clever way of sorting strings containing integers?

2008-10-09 Thread Holger
On 9 Okt., 10:57, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Thu, 09 Oct 2008 00:41:27 -0700, Holger wrote: I tried to do this elegantly, but did not come up with a good solution Sort strings like foo1bar2 foo10bar10 foo2bar3 foo10bar2 So that they come out: foo1bar2

Re: Clever way of sorting strings containing integers?

2008-10-09 Thread Marc 'BlackJack' Rintsch
On Thu, 09 Oct 2008 00:41:27 -0700, Holger wrote: I tried to do this elegantly, but did not come up with a good solution Sort strings like foo1bar2 foo10bar10 foo2bar3 foo10bar2 So that they come out: foo1bar2 foo2bar3 foo10bar2 foo10bar10 I.e. isolate integer parts and sort

Re: Clever way of sorting strings containing integers?

2008-10-09 Thread bieffe62
On 9 Ott, 09:41, Holger [EMAIL PROTECTED] wrote: I tried to do this elegantly, but did not come up with a good solution Sort strings like foo1bar2 foo10bar10 foo2bar3 foo10bar2 So that they come out: foo1bar2 foo2bar3 foo10bar2 foo10bar10 I.e. isolate integer parts and sort them