I’ve wanted to get an overview of my Python program, so I ran:
M-x occur
and for the regexp I’ve supplied
(def)|(class)
which failed to match anything.
I’ve also looked at this post, and tried
(def)\\|(class)
but this failed to match anything either…
How do I get M-x occur to match class or def?
You have to use single backslash (without parentheses, or you should escape parentheses as well):