in reply to Re: How to optimize a regex on a large file read line by line ?
in thread How to optimize a regex on a large file read line by line ?
You need to seek back the longest possible match (here 8) before reading the next chunk.
Actually the correct number is something like min ( p ,m )
With p = chunksize - pos
and m = length of longest possible match
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to optimize a regex on a large file read line by line ?
by Anonymous Monk on Apr 18, 2016 at 02:27 UTC | |
by LanX (Saint) on Apr 18, 2016 at 09:21 UTC |