regex - How can I remove all special characters except dot (.) in python? -


how can remove special characters "!@#$%^&*()_+" , similar things in python except dot (.), alphanumeric , space in python?

you can use maketrans/translate translate each character don't want special character use replace replace character empty string.

the other way go though character character , concatenate each character on new string if desired character.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -