You can skip
$skip characters pretty efficiently simply by using
/.{$skip}/. There's probably an index somewhere, since the regular expression engine needs it to keep track of /g matches, but I don't know how to directly access it. (It's
pos, as
tilly noted below.)
Update: wog reminds us that this requires the /s modifier, or a re-write as /(?s:.{$skip})/ to catch newlines as well.