Imran regrets ‘spur of the moment’ rebuke to judge