db: Handle .* in repository regex search
Created by: keegancsmith
This fixes an issue where we ignored .*
, leading to incorrect patterns in some cases. There are likely more cases where we incorrectly do not fallback to regex. However, that should be solved in another PR.
Test plan: unit tests
Fixes https://github.com/sourcegraph/sourcegraph/issues/4166