unpack, as the other monks have stated, is almost undoubtedly the way to go if your data is fixed-width.
It's a moot point, but your benchmarks may have been spurious since you didn't s/// whitespace in the doregex function like you did w/ dosubstr.
In reply to Re: fast string parser: regex versus substr
by Art_XIV
in thread fast string parser: regex versus substr
by mce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |