Make it possible to do a regexp search

Add option -g to signal that pattern is a regexp.
The option is necessary because it's kinda impossible to tell if a
string is a regexp without matching trivial strings which are not
intended to be, thus plummeting performance.