I want to find all packages which provide a shared object containing "ssl" in the file name. The apt-file manpage says:
--regexp | -x Treat pattern as a (perl) regular expression. See perlreref(1) for details. Without this option, pattern is treated as a literal string to search for.
Therefore my first try was
apt-file search --regexp .*ssl.*\.so.*
This, however, gave me results such as
witty-examples: /usr/lib/Wt/examples/feature/client-ssl-auth/resources
which has no ".so" in the file name.
I played around a bit and came up with
apt-file search --regexp .*ssl.*\\.so.*
i.e. I escaped the backslash which was supposed to escape the dot. This gave me the results I wanted.
Could someone explain why I need a double backslash in this case?