'Case' implementation for the Pattern class, which allows testing a String against a number of regular expressions. For example:
switch( str ) { case ~/one/ : // the regex 'one' matches the value of str }Note that this returns true for the case where both the pattern and the 'switch' values are
null
.
switchValue
- the switch value.