in reply to Re: Calculated position incorrect when using regex in text file that also contains binary info
in thread Calculated position incorrect when using regex in text file that also contains binary info
I just tried your code on a Windows 10 machine and here it fails. Result:
Even the "got" values (calculated based on the Windows OS) are not correct when checking the location of the items in a text editor (I'm using NPP as text editor) in Windows. It should be 923 and 930 for the 4th object (as opposed to 1139 and 1146 in your script result).1..8 ok 1 - No 1 first match starts at 26 ok 2 - No 1 first match ends at 33 ok 3 - No 2 first match starts at 68 ok 4 - No 2 first match ends at 75 ok 5 - No 3 first match starts at 87 ok 6 - No 3 first match ends at 94 not ok 7 - No 4 first match starts at 1315 # Failed test 'No 4 first match starts at 1315' # at E:\AppData\Programming\Perl\ReadFile/hippo.pl line 50. # got: '1139' # expected: '1315' not ok 8 - No 4 first match ends at 1322 # Failed test 'No 4 first match ends at 1322' # at E:\AppData\Programming\Perl\ReadFile/hippo.pl line 51. # got: '1146' # expected: '1322'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Calculated position incorrect when using regex in text file that also contains binary info on MSWin
by hippo (Archbishop) on Jun 17, 2020 at 08:20 UTC | |
Re^3: Calculated position incorrect when using regex in text file that also contains binary info
by Anonymous Monk on Jun 19, 2020 at 02:29 UTC |