New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regular expression search issue with hex bytes #573
Comments
RegEx search works with text not raw bytes. |
|
Both Viewer & Editor work with decoded Unicode codepoints, not raw bytes in the underlying files.
This one is funny. The search string is "\x52\x6F\x68\x69\x74", i.e. 20 individual characters. |
The only bug here should be fixed in 6071. |
Thank you both for the explanation. @w17, changing the code page to ISO 8859-1 worked. I just tested version 3.0.6071.0 x64. Item 3 is now fixed. One last thing. I may be making a mistake here, but searching for According to the documentation: |
Unfortunately multiline regex search is not supported. |
You can try plugins like REsearch to avoid this limitation. |
No problem. Just curious, what is the It might be a good idea to update the Regular expressions help topic and remove references to Also might be helpful to include a short note for |
Far Manager version
3.0.6069.0 x64
OS version
10.0.22623.1028
Other software
No response
Steps to reproduce
Setup
hex-test.bin
from attached archive hex-test.zipF3
to load the file in Viewer, then pressF4
to view in Hex mode01 31 87 EB AC 0C CD ED │ 52 6F 68 69 74 61 62 0D
F7
to search. Select "Search for text" and enable checkbox for "Regular expressions".Tests
\x31\x87
\x31..\xAC
\x52\x6F\x68\x69\x74
\x52\x6F\x68\x69
\xED
Expected behavior
Results
31 87
are be found and selected31 87 EB AC
are found and selected52 6F 68 69 74
are found and selected52 6F 68 69
are found and selectedED
is found and selectedActual behavior
Results
CD
is selected instead ofED
. Continuing the search selectsED
Searching for the same expression using grep works fine and the text is found as expected.
For example,
grep -P "\x31\x87" hex-test.bin
returns "grep: hex-test.bin: binary file matches"If the same searches are performed using the Editor instead of Viewer, the results are the same, expect for Item 3; in the Editor, the text is found and selected.
I've tried searching using both
\xNN
and\xNNNN
formats. Both of them give the same results.The text was updated successfully, but these errors were encountered: