July 2007
Intermediate to advanced
128 pages
2h 39m
English
Ruby provides an object-oriented regular expression interface through the Regexp and MatchData classes, as well as several built-in methods of the String class.
Ruby also provides the /.../ and =~ operators to provide a Perl-like operator syntax. The /.../ operator is a synonym for Regexp.new, and =~ is a synonym for String#match. The /.../ operator is commonly used to pass a Regexp object to a method, e.g., "foo, bar, frog".split(/,\s*/).