Regular expressions (regexps) are patterns which describe the contents of a string. They’re used for testing whether a string contains a given pattern, or extracting the portions that match. They are created with the /pat/ and %r{pat} literals or the Regexp.new constructor.| docs.ruby-lang.org
Public Instance Methods| docs.ruby-lang.org
Regular expressions (regexps) are patterns which describe the contents of a string. They’re used for testing whether a string contains a given pattern, or extracting the portions that match. They are created with the /pat/ and %r{pat} literals or the Regexp.new constructor.| docs.ruby-lang.org
A String object has an arbitrary sequence of bytes, typically representing text or binary data. A String object may be created using String::new or as literals.| docs.ruby-lang.org