Derp. I'll change the substr to a preg_match.