Jan-21-2018, 08:32 PM
(This post was last modified: Jan-21-2018, 08:32 PM by Gribouillis.)
A way to ignore the space is simply to allow white space together with the characters you mentioned. I would use
valid = re.match(r'^(?:[a-zA-Z0-9]|\s)*$', inp1) is not NoneTips:
- Always use raw strings when you write regexes, ie
r''
- Python 2 support ends in 2020, use python 3.