>>206 Python

import re
def num_rotate(s):
  num_list = re.findall(r'\d+', s)
  fmt = re.sub(r'\d+','{}', s)
  return fmt.format(*(num_list[-1:] + num_list[:-1])) if len(num_list) > 0 else s

print(map(num_rotate, ['', 'x', 'foobarhoge', '2014-10-03 00:17:21', '1 2 3 4', 'a0=0;a1=1;a2=2;a3=3']))
→['', 'x', 'foobarhoge', '21-2014-10 03:00:17', '4 1 2 3', 'a3=0;a0=1;a1=2;a2=3']