[search addon] Do a string search if a bad regexp is entered
[search addon] Simplify control flow