Mega Code Archive
Categories
/
Ruby
/
String
The !~ operator returns true if it does not match the string, false otherwise
color = "color colour" color !~ /colou?r/ # => false