VFPX/GoFish

Interesting behaviour searching for negative numbers

Closed this issue ยท 1 comments

โ„น Computer information

  • VFP version: 9 (7423)
  • GoFish version: 7.1.16

๐Ÿ“ Provide detailed reproduction steps (if any)

  1. Launch GoFish 7, enter search expression for a negative number (e.g. -99)
  2. Perform a Plain search, with a Directory scope search for a negative number, Whole Word is NOT ticked, Subdirectories IS ticked
  3. Search says No Matches Found
  4. Change search expression to remove the minus sign, e.g. change it to 99 and repeat the same search
  5. Search returns results that show the previous search (-99) should have returned results.
  6. 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.
  7. I could change the search expression to -*99 and change the mode to Wildcards 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.
  8. 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
image

Example of Whole word search for 99 returning results that demonstrate -99 should have returned results
image

Example of Wildcard search for -*99 returning results that demonstrate -99 should have returned results
image

@PGibsonCoUk

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