search: function to convert or-operators on patterns to regexp
Created by: rvantonder
Optimization for regexp (basically makes or
syntactic sugar for |
). Partly addresses #11299 (for regexp). A couple of checks will make this work for repo:
and file:
as well (tracked in #11009).
Not used anywhere yet, I will add this to the query processing along with integration tests in a subsequent PR.