Fix search case sensitivity and regexps

Search is now case sensitive iff there are upper case letters in the
search string.

We now do a regexp search iff the search string is a valid regexp,
otherwise a plain string search.