Update pwd.py

Adding missed conditions for space and digits.
revers arguments to search(): re.search(p, c) => re.search(c, p)