Newbie: find, search command
Sarah Reichelt
sarahr at genesearch.com.au
Thu Dec 16 18:52:57 EST 2004
> I have a tab delimited list I want to be able to search, say I have a
> list of names for example;
>
> Father Xmas Is Drunk
> New Years Is after Xmas
> Rudolph The Reindeer
> Merry Xmas To all
>
> I want to search for ALL instances of Xmas and display the whole
> matching line of each found in a list field.
> So far I can get it to display the first line only ( Father Xmas Is
> Drunk) !
> Any help would appreciated!!! I have checked the tutorials for help
> but couldn't find what I was looking for,
> is there an example stack or notes anyone may know of?
>
The filter command is the fastest method, but be careful as it is a
destructive search i.e. it deletes the liens that don't match, so copy
your original data into a variable, filter that and keep the original
intact.
e.g.
put field "Data" into tList
filter tList with "*Xmas*"
put tList into fld "Finds"
Using the * before & after the search word allow the lines to have
characters before and after the word. If you filtered with "Xmas*", you
would only get lines that started with Xmas.
Cheers,
Sarah
More information about the use-livecode
mailing list