Interesting behaviour searching for negative numbers
Closed this issue ยท 1 comments
PGibsonCoUk commented
โน Computer information
- VFP version: 9 (7423)
- GoFish version: 7.1.16
๐ Provide detailed reproduction steps (if any)
- Launch GoFish 7, enter search expression for a negative number (e.g.
-99
) - Perform a
Plain search
, with aDirectory
scope search for a negative number, Whole Word is NOT ticked, Subdirectories IS ticked - Search says No Matches Found
- Change search expression to remove the minus sign, e.g. change it to
99
and repeat the same search - Search returns results that show the previous search (
-99
) should have returned results. - Interestingly a
Whole word
search for 99 does return results for -99 (presumably because of word delimiters) so that's a workaround of sorts, I can then just disregard the results for the positive number. - I could change the search expression to
-*99
and change the mode toWildcards
and I will get results showing-99
but obviously there might be lots of other results that I'm not interested in so this workaround may also return additional results. - Perhaps another side effect of the Grep integration WRT how the minus symbol is handled so it might not be restricted to negative numbers and is perhaps to do with any search expression beginning with the minus symbol, just more obvious with negative numbers.
โ๏ธ Expected result
Greater than zero search results
โ Actual result
Prompt: No matches found
๐ท Screenshots
Example of search for -99
, NOT whole word, returning zero results
Example of Whole word search for 99
returning results that demonstrate -99
should have returned results
Example of Wildcard search for -*99
returning results that demonstrate -99
should have returned results
Jimrnelson commented
Fixed in Version 7.1.17 - 2024-07-18.
Searches expressions beginning with -
will no longer use grep.
Thanks for bringing this to my attention