Using PCRE Perl compatible regex, the ‘|’ in the square brackets would be allowed as well. Being in those square brackets, the ‘|’ is not seen as an OR but rather as is.