RegEx search by hex code
Moderators: white, Hacker, petermad, Stefan2
RegEx search by hex code
I am dealing with some binary files and I'm trying to search them using RegEx option.
In particular, I am searching for 0x00 (\x00) and 0x01 (\x01) char codes.
When I'm searching for \x00, I find nothing, but I also don't get the "Not found" alert box.
When I'm searching for \x01, I find lost of false positives (including 0x00s).
In particular, I am searching for 0x00 (\x00) and 0x01 (\x01) char codes.
When I'm searching for \x00, I find nothing, but I also don't get the "Not found" alert box.
When I'm searching for \x01, I find lost of false positives (including 0x00s).
- ghisler(Author)
- Site Admin
- Posts: 48113
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, this is a limitation of the used regex library. Searching for 00 characters is not reliable. The library is meant for finding text in text files.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- MarkFilipak
- Member
- Posts: 164
- Joined: 2008-09-28, 01:00 UTC
- Location: Mansfield, Ohio
Re: RegEx search by hex code
Re: viewtopic.php?f=3&t=72997
Could you fix this, Christian? It appears that when '\x00' is in the pattern, the match is '\x00' plus the next byte. The search index is now off by 1 and the remainder of the pattern is not matched, even if it is there. This appears to happen only for '\x00' (and maybe only if it's the 1st byte but I don't have the source code and I don't have the patience to grope for more clues).
Could you fix this, Christian? It appears that when '\x00' is in the pattern, the match is '\x00' plus the next byte. The search index is now off by 1 and the remainder of the pattern is not matched, even if it is there. This appears to happen only for '\x00' (and maybe only if it's the 1st byte but I don't have the source code and I don't have the patience to grope for more clues).
Hi Christian! Delighted customer since 1999. License #37627
Re: RegEx search by hex code
I guess you are not running TC version 7.56 or 7.57MarkFilipak wrote: ↑2020-10-12, 17:09 UTC Re: viewtopic.php?f=3&t=72997
Could you fix this, Christian? It appears that when '\x00' is in the pattern, the match is '\x00' plus the next byte. The search index is now off by 1 and the remainder of the pattern is not matched, even if it is there. This appears to happen only for '\x00' (and maybe only if it's the 1st byte but I don't have the source code and I don't have the patience to grope for more clues).
![Smile :)](./images/smilies/icon_smile.gif)
So hijacking an old thread make no sense for me.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1374a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1374a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
- MarkFilipak
- Member
- Posts: 164
- Joined: 2008-09-28, 01:00 UTC
- Location: Mansfield, Ohio
Re: RegEx search by hex code
I'm running version 9.51. Does that really matter to you? It's still a problem. It's still the same problem.Horst.Epp wrote: ↑2020-10-12, 17:42 UTCI guess you are not running TC version 7.56 or 7.57MarkFilipak wrote: ↑2020-10-12, 17:09 UTC Re: viewtopic.php?f=3&t=72997
Could you fix this, Christian? It appears that when '\x00' is in the pattern, the match is '\x00' plus the next byte. The search index is now off by 1 and the remainder of the pattern is not matched, even if it is there. This appears to happen only for '\x00' (and maybe only if it's the 1st byte but I don't have the source code and I don't have the patience to grope for more clues).![]()
So hijacking an old thread make no sense for me.
Hi Christian! Delighted customer since 1999. License #37627
Re: RegEx search by hex code
It matters because I'm normaly not interested to read error reports for such old versions of TCMarkFilipak wrote: ↑2020-10-12, 19:08 UTCI'm running version 9.51. Does that really matter to you? It's still a problem. It's still the same problem.Horst.Epp wrote: ↑2020-10-12, 17:42 UTCI guess you are not running TC version 7.56 or 7.57MarkFilipak wrote: ↑2020-10-12, 17:09 UTC Re: viewtopic.php?f=3&t=72997
Could you fix this, Christian? It appears that when '\x00' is in the pattern, the match is '\x00' plus the next byte. The search index is now off by 1 and the remainder of the pattern is not matched, even if it is there. This appears to happen only for '\x00' (and maybe only if it's the 1st byte but I don't have the source code and I don't have the patience to grope for more clues).![]()
So hijacking an old thread make no sense for me.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1374a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1374a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
- MarkFilipak
- Member
- Posts: 164
- Joined: 2008-09-28, 01:00 UTC
- Location: Mansfield, Ohio
Re: RegEx search by hex code
But I'm not reporting a problem "for such old versions of TC". I'm reporting a problem for the current version.
If you think I should do something different, what is it?
Hi Christian! Delighted customer since 1999. License #37627
Re: RegEx search by hex code
Look into the title of this Sub-ForumMarkFilipak wrote: ↑2020-10-12, 21:14 UTCBut I'm not reporting a problem "for such old versions of TC". I'm reporting a problem for the current version.
If you think I should do something different, what is it?
It says TC7.56(a)/7.57 bug reports
There is a Forum for 9.5x bug reports.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1374a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1374a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
- MarkFilipak
- Member
- Posts: 164
- Joined: 2008-09-28, 01:00 UTC
- Location: Mansfield, Ohio
Re: RegEx search by hex code
Oh. Forgive me. I was given a link to this thread. I didn't know its sub-forum was limited in any way.Horst.Epp wrote: ↑2020-10-13, 08:33 UTCLook into the title of this Sub-ForumMarkFilipak wrote: ↑2020-10-12, 21:14 UTCBut I'm not reporting a problem "for such old versions of TC". I'm reporting a problem for the current version.
If you think I should do something different, what is it?
It says TC7.56(a)/7.57 bug reports
There is a Forum for 9.5x bug reports.
Hi Christian! Delighted customer since 1999. License #37627