Update URLParser.py

Fixes an error in the recent pull request. The assignment of regex should not be removed, otherwise the next if statement will always resolve to false.