Ticket #4587 (new defect)
regexp search issues in mcviewer
Reported by: | dextarr | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Future Releases |
Component: | mcview | Version: | master |
Keywords: | mcviewer regexp | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Searching using regexp patterns sometimes result in weird matches.
How to reproduce:
Create a test file:
printf "0\n1\n2\n3\n4\n5\n101\n11\n12\n13\n14\n15\n" >input.txt
open the file in mcviewer (F3)
search in the file with F7 using regexp mode for "^1" (and then hitting 'n' for the next match) finds as expected:
the first character in 1 101 12 13 14 15
but also _both_ 1s in 11
reverse search the same pattern (? or F7 and setting 'Backwards' or just pressing "N") in regexp mode finds as expected:
the first character in 15 14 13 12 1
but also _both_ 1s in 11 and 101
the same tests work in mcedit as expected.
thank you for looking into the issue!
Another example:
https://lists.midnight-commander.org/pipermail/mc/2024-November/005786.html