Jump to content
Muxe Inc Forums
Sign in to follow this  
dandv

Wrong Whole words search results

Recommended Posts

dandv    0

1. Create a file with the following contents

 

bugg 1
bug 2

 

2. View the file and search for 'g', Whole words.

 

3. Notice that NDN finds the g in 'bugg'. That is because the

character before 'g' was another g. NDN will also find 'gg' in

'buggg 3'.

 

This doesn't happen in the editor but happens in DNOSP's viewer :->

 

Hope this helps,

Dan Dascalescu

 

 

PS: is this code in fviewer.pas to blame, or is it a problem

related to the Boyer-Moore table?

 

     if WholeWords and not (((BufPos = 1) or (Char(Buf^[BufPos-2+StPos]) in BreakChars)) and
        (Char(Buf^[BufPos+Length(What)-1+StPos]) in BreakChars)) then

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×