to find the first numeric line?
Jim Lambert
jiml at netrin.com
Fri Feb 1 18:10:23 EST 2013
Craig wrote:
> But there is a problem in that much, if not all of his data is both alpha and numeric, like "A2"
> So filtering will not eliminate those lines that contain strings in that form.
>
Works on this:
1a
1b
a1
a2b4
3t
c7
5u
h2
5k
Give it a shot.
JimL
> Mark wrote:
>
>> have you taken a look at the FILTER command?
>> filter list with "[1-9]*"
>
> That is a possible approach, like this:
>
> function getNumericLineStart temp
> put the number of lines of temp into totalLines
> sort numeric temp
> filter temp with "[1-9]*"
> put the number of lines of temp into totalLinesNumericStart
> return totalLines-totalLinesNumericStart
> end getNumericLineStart
>
> Not sure if this is any speedier than a repeat loop.
>
> Jim Lambert
More information about the use-livecode
mailing list