I am building a forum application in Django and I want to make sure that users dont enter certain characters in their forum posts. I need an efficient way to scan their whol
Example: just tailor to your needs.
### valid chars: 0-9 , a-z, A-Z only import re REGEX_FOR_INVALID_CHARS=re.compile( r'[^0-9a-zA-Z]+' ) list_of_invalid_chars_found=REGEX_FOR_INVALID_CHARS.findall( topic_message )