模式可以使用“|”位运算符进行逻辑“或”运算得到一个新模式。例如,pattern1、pattern2是两个模式,那么 pattern= pattern1|pattern2。一个字符串如果匹配模式pattren1或匹配模式pattern2,那么就匹配模式pattern。