"... So you need to write a single pattern that matches either of two different patterns (the "or" case) or both of two patterns (the "and" case) or that reverses the sense of the match ("not"). This situation arises often in configuration files, web forms, or command-line arguments. ..."