Update to use regex to match error pages