escaping for regular expressions in searches (bugfix & improvement)