5       def initialize(expected)
 
  11         return true if actual =~ @expected
 
  16         return "expected #{@actual.inspect} to match #{@expected.inspect}", @expected, @actual
 
  19       def negative_failure_message
 
  20         return "expected #{@actual.inspect} not to match #{@expected.inspect}", @expected, @actual
 
  24         "match #{@expected.inspect}"
 
  29     #   should match(regexp)
 
  30     #   should_not match(regexp)
 
  32     # Given a Regexp, passes if actual =~ regexp
 
  36     #   email.should match(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)
 
  38       Matchers::Match.new(regexp)