probably asked many times before but i'm unable to find any topic that fit my needs.
I'm trying to create a search script (prefering ini file) for multiple purpose.
That way i only need 1 file to make (instead of 6) and keeps it simple.
Only disadvantage using ini is that every item in topic needs different numbers.
[TOPIC]
ITEM01=data01
ITEM02=data02
ITEM03=data03
ITEM04=data04
ITEM05=data05
but searching ini is much more simple as in *.txt or *.dat.
alias search {
if (readini(ini,topic,word) == $1-) {
aline @search $1-
}
}
and for *.txt (found in other topic)
alias search2 {
var %find = $1-
var %ax = 0
var %file = $mircdirfile.dat
window -ak0SC @search 300 200 603 322
var %xlines = $lines(%file)
while (%ax <= %xlines) {
inc %ax
if (%find isin $read(%file,n,%ax)) { aline @search $read(%file,n,%ax) }
}
}
But in both situations i'm unable to search for just a piece of what the actual search was about.
/search Test gives everything with Test in it aka Test,Test2,Test3 etc.
But it won't work when i do this and only "Test" is in file.dat
/search This.is.a.test
or
/search This is a test
There is test in both but it gives me no results
Is there an easy way to fix this?