def cleanup_page_name(title):
 if (not title):
  return title
 name = title.lower()
 name = re.sub(u'[~!@#$%^&*+()<>,."\'\\?]', u'', name)
 name = re.sub(u'[:/]', u'-', name)
 name = u'-'.join(name.split())
 name = re.sub(u'(-)\\1+', u'\\1', name)
 return name[:140]

def cleanup_page_name ( title ) : if ( not title ) : return title name = title . lower ( ) name = re . sub ( u'[~!@#$%^&*+()<>,."\'\\?]' , u'' , name ) name = re . sub ( u'[:/]' , u'-' , name ) name = u'-' . join ( name . split ( ) ) name = re . sub ( u'(-)\\1+' , u'\\1' , name ) return name [ : 140 ]
make page name from title .