Changed the format for the sscanf used in regread