in reply to Re: Split very big string in half
in thread Split very big string in half

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;