[personal kdb+] Matching more than on string in a file

Hi all,

could you please help me in finding out how to match more than one
strings in a file . I tried
with various option but not working . Currently i use below to match
one string

{x where x like “*foo*”}read0 `:/q/log.txt

Thanks in Advance


Submitted via Google Groups

something like… ?{x where (x like “*foo*”)or(x like “*goo*”)}read0 `:/q/log.txt ? ? ? ??

To avoid a lot of 'or’s you could do something along the lines of:{x where “b”$(+/){x like y}[x;] each (“*foo*”;“*bar*”;“*baz*”)} read0:/path/to/file.txtOn May 12, 1:22?pm, pawan singh <pawan.sing...> wrote:&gt; something like... ?{x where (x like "*foo*")or(x like "*goo*")}read0&gt; :/q/log.txt>>>>>> On Wed, May 12, 2010 at 10:06 PM, Pravin <pravin198…> wrote:> > Hi all,>> > ?could you please help me in finding out how to match more than one> > strings in ?a file . I tried> > with various option but not working . Currently i use below to match> > one string>> > {x where x like “foo”}read0 `:/q/log.txt>> > Thanks in Advance>> > –> >

Submitted via Google Groups</pravin198…></pawan.sing…>

q){x where(|/)x like/:(“*foo*”;“*bar*”)}read0`:log.txt
“foo”
“bar”
“aaaaaaaaaaaaaabar99999999999999999”