Constructs a regex that matches the intersection of all input regex.
This operator has no analog in standard regular expressions, so the
return type is always an ExtRegex.
NOTE: This is just a cheap constructor. There is no heavy computation
until you call toStdRegex.
constpasswordRegex = and( parse(/.{12,}/), // 12 letters or more parse(/[0-9]/), // at least one number parse(/[A-Z]/), // at least one upper case letter parse(/[a-z]/), // at least one lower case letter )
Constructs a regex that matches the intersection of all input regex. This operator has no analog in standard regular expressions, so the return type is always an
ExtRegex
.NOTE: This is just a cheap constructor. There is no heavy computation until you call
toStdRegex
.