Perlfect Solutions
 

[Perlfect-search] joker support for Perlfect Search 3.20

Daniel Naber daniel.naber@t-online.de
Wed, 4 Apr 2001 02:30:42 +0200
--------------Boundary-00=_63S8ZR9SL45FMMLCSMMP
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

here's a version of search.pl that supports the * as a joker, BUT it does=
=20
only work with "Match all words". "-" will be ignored. The * can now be=20
used anywhere in the term.

It's not a patch, but the complete file "search.pl". You can use it=20
instead of the old one.

Please test this and let me know if it works (it is much slower than the=20
normal version if you have many files, if you don't use * the speed shoul=
d=20
be the same). If it's okay, I'll try to extend it so that OR and "-" work=
=20
again.

Regards
 Daniel

--=20
Daniel Naber, Paul-Gerhardt-Str. 2, 33332 Guetersloh, Germany
Tel. 05241-59371, Mobil 0170-4819674

--------------Boundary-00=_63S8ZR9SL45FMMLCSMMP
Content-Type: application/x-perl;
  name="search.pl"
Content-Disposition: attachment; filename="search.pl"
Content-Transfer-Encoding: base64

IyEvdXNyL2Jpbi9wZXJsIC13CiMkcmNzID0gJyAkSWQ6IHNlYXJjaC5wbCx2IDEuMzEgMjAwMS8w
My8wMyAyMzo0NTozNSBkYW5pZWwgRXhwICQgJyA7CgojIFBlcmxmZWN0IFNlYXJjaAojCiMgQ29w
eXJpZ2h0IChDKSAxOTk5LTIwMDAgR2lvcmdvcyBaZXJ2YXMgPGdpb3Jnb3NAcGVybGZlY3QuY29t
PgojIAojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0
ZSBpdCBhbmQvb3IgbW9kaWZ5CiMgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJh
bCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKIyB0aGUgRnJlZSBTb2Z0d2FyZSBGb3Vu
ZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNl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