Someone asked how to find all files of certain file types, and one of the answers was:
find /path/to -regex ".*\.\(jpg\|gif\|png\|jpeg\)" > log
I'm trying to understand the backslashes better. The first backslash is saying to take the period as literal, not as pattern matching, is that right? If so, why is the second backslash needed, and the third? It seems like the second backslash is saying take the ( as a literal character.