in reply to Re^3: Exact string matching
in thread Exact string matching
The fastest way to n-tuple long strings is using unpack:
$text = 'howdoidoit';; print for unpack '(a3X2)*', $text;; how owd wdo doi oid ido doi oit it it print for unpack '(a4X3)*', $text;; howd owdo wdoi doid oido idoi doit oit oit oit
You have to discard the last n-1 results but that is very quick and simple to do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Exact string matching
by AnomalousMonk (Archbishop) on Oct 16, 2011 at 23:29 UTC |