import re


def sanitizePrefix(prefix):
    """strips any leading '/' and substitutes non alphanumeric characters by '_'
    """
    prefix = prefix.lstrip('/')
    return re.sub('[^0-9a-zA-Z]+', '_', prefix)