Made the regex for perfect more lenient.