I'd like to search multiple packages at one using a regexp connecting pattern with logical or |.
Assuming the two files /usr/lib/apache2/modules/httpd.exp and /usr/lib/apt/apt.systemd.daily exist:
$ sudo dpkg -S /usr/lib/apache2/modules/httpd.exp
apache2-bin: /usr/lib/apache2/modules/httpd.exp
$ sudo dpkg -S /usr/lib/apt/apt.systemd.daily
apt: /usr/lib/apt/apt.systemd.daily
why does apt-file search --regexp '/usr/lib/apache2/modules/httpd.exp|/usr/lib/apt/apt.systemd.daily' only return
apache2-bin: /usr/lib/apache2/modules/httpd.exp
The solution is intended to be used for an optimization of the GNOME build tool jhbuild. It should work an a large set of Ubuntu versions.