I want to write a template tag to replace spaces,tabs,new lines,commas,underscores with dashes to make a SEO friendly URL:
re.sub('\s+', '-', str)
this line of code replace spaces with dash and:
re.sub('(?<=[,.?!\t\n ])+', '-', str)
this line of code should replace ?<=[,.?!،
and space with dash, but it doesn't.