in reply to Split very big string in half
.{,500000} [download]
(?:.{1000}){,499}.{,1000} [download]
The line that ended up working (splitting on the first </html> after 499,000 chars) is /(?:.{1000}){1,499}.*?<\/html>/gs;