'Converts a word "into_it_s_underscored_version"
Convert any "CamelCased" or "ordinary Word" into an
"underscored_word".
This can be really useful for creating friendly URLs.'

def underscore(self, word):

    return re.sub('[^A-Z^a-z^0-9^\\/]+', '_', re.sub('([a-z\\d])([A-Z])', '\\1_\\2', re.sub('([A-Z]+)([A-Z][a-z])', '\\1_\\2', re.sub('::', '/', word)))).lower()
