filter command and "not" wildcards

Sivakatirswami katir at hindu.org
Thu Dec 6 16:12:00 EST 2001


on 12/6/01 8:13 AM, use-revolution-request at lists.runrev.com at
use-revolution-request at lists.runrev.com wrote:

> I've also requested this.  Suggested syntax:
> 
>   filter <container> excluding <expression>
> 
> It should be one of those things where a relatively small programming effort
> produces a considerable expansion in facility.

This is very fast:

 put url "file:harddrive/somefile.txt" into dataToFilter
 
 repeat for each line x in dataTofilter
    if x contains (expression) then
       next repeat
    else
      put x & cr after dataOutPut
    end if
  end repeat
 
put dataOutPut into url "file/processed/theFilteredData.txt"

I have processed lists up to 120,000 lines with the above in under 2 secs

Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
katir at hindu.org 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Read The Master Course Lesson of the Day at
http://www.gurudeva.org/lesson.shtml




More information about the use-livecode mailing list