human
Python Regex - Remove special characters but preserve apostraphes
assistant
Here is some code to remove all non -word, -whitespace, or -apostrophe characters from string `doesn't this mean it -technically- works?`

re.sub("[^\\w' ]", '', "doesn't this mean it -technically- works?")

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.