Alternation Verticalbarcharactersareusedtoseparatealternativepatterns.Forexample,thepatterngilbert|sullivanmatcheseither"gilbert"or"sullivan
←Alternation Subpatterns→ ©1997–2017ThePHPDocumentationGroup LicensedundertheCreativeCommonsAttributionLicensev3.0orlater
←Dot Alternation→ ©1997–2017ThePHPDocumentationGroup LicensedundertheCreativeCommonsAttributionLicensev3.0orlater
varre=newRegExp('\\w+'); 正则表达式中特殊字符的含义 字符类别(CharacterClasses) 字符集合(CharacterSets) 边界(Boundaries) 交替(Alternation