Can someone please post a python snippet to create a link based on the title, like in stackoverflow (or wordpress)…
e.g.
title : Global across "Modules" ?
corresponding link : http://example.com/8277516/globals-across-modules
I do not need any chars other than alphabets or numbers or ‘-‘. Also i don’t need the starting or ending character of the output string to be ‘-‘
How about this:
This works on Python 2; there it will keep only ASCII alphanumeric characters. Under Python 3, it will also keep Unicode alphanumerics, which might not be what you want.