extract generic digit processing method