def sanitize_release_group(string):
 if (string is None):
  return
 string = re.sub('\\[\\w+\\]', '', string)
 return string.strip().upper()

def sanitize_release_group ( string ) : if ( string is None ) : return string = re . sub ( '\\[\\w+\\]' , '' , string ) return string . strip ( ) . upper ( )
sanitize a release_group string to remove content in square brackets .