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.
I would suggest something like: 

```
/^([ \t]*)(["|'][a-zA-Z0-9_]*["|']: )?(["|'].*["|'],?[ \t]*)$
```

so the user can use `"` or `'`