Tuesday, March 1, 2011

Three ways of declare a regex operator in Ruby


/mm\/dd/ # => /mm\/dd/
Regexp.new("mm/dd") # => /mm\/dd/
%r{mm/dd} # => /mm\/dd/