Update webservice.py

Fix Some bugs wrt to python regular expression searches.