'Scrub a tag name.'

def _scrub_tag_name(self, name):

    if (not name):
        return None
    reg_exp = re.compile('\\s')
    scrubbed_name = re.sub(reg_exp, '', name)
    if scrubbed_name.startswith(self.hierarchy_separator):
        scrubbed_name = scrubbed_name[1:]
    if ((len(scrubbed_name) < self.min_tag_len) or (len(scrubbed_name) > self.max_tag_len)):
        return None
    return scrubbed_name
