rxp === str â true or false
Instance Public methods
Case EqualityâUsed in case statements.
a = "HELLO" case a when /^[a-z]*$/; print "Lower case\n" when /^[A-Z]*$/; print "Upper case\n" else; print "Mixed case\n" end #=> "Upper case"
Following a regular expression literal with the === operator allows you to compare against a String.
/^[a-z]*$/ === "HELLO" #=> false /^[A-Z]*$/ === "HELLO" #=> true
Please login to continue.