Fix string modal and add database filter

This fixes the regex check for the string modal in the code editor. The
string modal button now works again.

It also adds a filter function to the typeahead database view so that we
can filter the databases that are returned.
Nice idea I'll make the change