Switch regexp to use more secure begin & end
Escape special characters in submitted value

Should make lookup more resilient to bad character input.
Refactor common regexp to method