原文链接:http://www.ruby-doc.org/core-1.9.3/Regexp.html Regexp A Regexp holds a regular expression, used to match a pattern against strings. Regexps are created using the /.../ and %r{...} literals, and by the Regexp::new constructor. Regular expressions…