Perlfect Solutions

[Perlfect-search] Using "&" as the search text

Daniel Naber
Thu, 27 Sep 2001 21:47:57 +0200
On Thursday 27 September 2001 08:59, you wrote:

> But I have some documents which has the "&" sign inside, say "A&C". When
> I type "A&C" in the search field, it return nothing and the query string
> is now changed to "A  C".

You'll have to make several changes to allow & (that is & in 

1. Add & and ; to this line $buffer =~ tr/a-zA-Z0-9_*/ /cs; in both and, i.e.
$buffer =~ tr/a-zA-Z0-9_*&;/ /cs;

2. Just below that line, add ${$buffer} =~ s/&/&/igs; in

3. Remove the & from's cleanup() function

I think this way every special character that's represented as an entity 
in the documents and that's added in step 2. can be searched.


Daniel Naber, Paul-Gerhardt-Str. 2, 33332 Guetersloh, Germany