Hi all, LC 5.5.3. I made some tests with time stamps, where the first line beginning with a number was at about line 18,000: The classic cycle thru like Craig's and Bert's took +/- 8 msec Iterating by halves to +/- 28 msec Peters approach with matchchunk and lineIndex I didn't got to run (some execution error on lineIndex, I don't know)
So the good old pure repeat loop is still the best Thanks for ideas Tiemo > -----Ursprüngliche Nachricht----- > Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag > von dunb...@aol.com > Gesendet: Freitag, 1. Februar 2013 05:45 > An: use-livecode@lists.runrev.com > Betreff: Re: to find the first numeric line? > > Just so, and his data was alphanumeric. After sorting, he wanted to find > the first line that had a digit as char 1. Since alpha sorts before > numbers, he wanted to find the line number where a transition, for example, > might have been: > > > a1 > a2 > 1a --this line > 1b > > > The old fashioned way may have been the best, especially with "repeat for > each..." > > > Craig Newman > > > > > > > -----Original Message----- > From: Robert Sneidar <slylab...@me.com> > To: How to use LiveCode <use-livecode@lists.runrev.com> > Sent: Thu, Jan 31, 2013 11:11 pm > Subject: Re: to find the first numeric line? > > > Great idea, but I think he wants to know the line position in the string. I > could be wrong. > > Bob > > > On Jan 31, 2013, at 7:59 PM, Mark Stuart wrote: > > > Hi Tiemo, > > I haven’t tried this, but have you taken a look at the FILTER command? > > filter list with “[1-9]*” > > > > Thanx, > > Mark Stuart > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription > preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode