Don't use deprecated from_str and repeat.