# Using a backslash with occur

How can I use occur (M-s o) to search for a string that contains a backslash, e.g. \def?

You need to escape the backslash with another backslash. So: M-s o \\def