Intelligent sorting: A bit of a poser

Mike Bonner bonnmike at gmail.com
Thu Jul 1 09:45:05 CDT 2010


Another method used to split at the numeric.

on mouseUp
   put specialsorter(field "srcF")
end mouseUp

function specialSorter pVar
   repeat for each line theLIne in PVar
      get matchchunk(theLine,"([a-zA-Z\s]\d)" , theChar,theEnd )
      put comma after char theChar of theLine
      put theLine & return after tTemp
   end repeat
   delete the last char of tTemp
   sort lines of tTemp ascending numeric by item 2 of each
   sort lines of tTemp ascending by item 1 of each
   replace comma with empty in tTemp
   return tTemp
end specialSorter


On Thu, Jul 1, 2010 at 8:42 AM,  <DunbarX at aol.com> wrote:
> Colin, I actually just read your correction of my earlier script. I swear I
> did not do so before I sent my latest one in. Almost identical except you
> like the early part of the alphabet, and I like the latter.
>
> Craig
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list