This was a question about matching a regexp using a large quantifier:
$regexp2 = '%name="__VIEWSTATE" id="__VIEWSTATE" value="[/a-zA-Z0-9+=]{1,100000}"%';
100,000 is too large (the regexp engine will only accept a quantifier of 65536 or less). The solution was simple, but eluded me until I'd posted here:
$regexp2 = '%name="__VIEWSTATE" id="__VIEWSTATE" value="[/a-zA-Z0-9+=]{100,}"%';
In this case, since the expression closes with a quote and quotes aren't allowed in the expression itself, I don't have to care how large the string is.