old_contents: import re
  
  def get_key(v):
      prefix, index = re.match(r'([a-z]+)_(\d+)', v).groups()
      return prefix, -int(index)
  
  
new_contents: import re
  
  def get_key(v):
      prefix, index = re.match(r'([a-zA-Z]+)_(\d+)', v).groups()
      return prefix, -int(index)
  
  
subject: fix a regrex in common.py