Gluing applications together is what programming languages like Ruby and Perl do particularly well: their text processing facilities are excellent. Whether its parsing configuration files, serving up web pages or capturing the output of a program, you will be working with Strings. Where Ruby and Perl differ, however, is in the object oriented-ness of their approach. In Ruby, Strings have their own member methods which can be accessed to perform each processing function. Keep this in mind throughout this section.
The following subsection and the next two subsections are closely related. I first briefly present the simple searching functions that accept
Strings as parameters; then I dive right in to regular expressions. ...