in reply to Split very big string in half

500,000 = 500 * 1000, so change
.{,500000}
to
(?:.{1000}){,499}.{,1000}

Replies are listed 'Best First'.
Re^2: Split very big string in half
by fpscolin (Initiate) on Apr 15, 2015 at 19:43 UTC
    While this didn't work, it pointed me in the right direction so thanks :)

    The line that ended up working (splitting on the first </html> after 499,000 chars) is /(?:.{1000}){1,499}.*?<\/html>/gs;