Filtering Columnar Data
Gregory Lypny
gregory.lypny at videotron.ca
Fri Dec 9 23:26:58 EST 2005
Not sure I understand, Ken. Your first statement puts searchString
in the fifth column, while the second puts it in the fourth. If I
changed mine to
filter theData with "*" & tab & searchString & tab & "*"
or
filter theData with "*" & tab & searchString & "*"
it would still find the string in the second column, but perhaps in
higher columns too because the pattern can be shifted right.
Greg
On 9-Dec-05, at 7:42 PM, Ken Ray wrote:
>
> On 12/9/05 4:19 PM, "Gregory Lypny" <gregory.lypny at videotron.ca>
> wrote:
>
>> Hello everyone,
>>
>> I use the filter command on tab-delimited text files when I want to
>> pick off a string in a particular column. For example, if the string
>> is located in the second column of a five column file, I use
>>
>> filter theData with "*" & tab & searchString & tab & "*" & tab & "*"
>> & tab & "*" .
>>
>> This, I assume, ensures that my hits don't include lines where the
>> string appears in any other column. It works like lightening when I
>> search in any of the first four columns, but beyond that I get the
>> dreaded spinning beach ball in Mac OS X (Tiger). Is there a
>> better way?
>
> Yes, the problem (I think) is that you probably have the "*" after
> the last
> column - I just worked with this today, and ran into the same
> problem. If
> you remove the last asterisk you should be fine:
>
> "*" & tab & "*" & tab & "*" & tab & "*" & tab & searchString
>
> whereas for column 4 it would be:
>
> "*" & tab & "*" & tab & "*" & tab & searchString & tab & "*"
>
> Hope this helps,
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
More information about the use-livecode
mailing list