Section 3.1. Regular Expression Syntax


Chapter 3. Working with Regular Expressions

I would choose

To lead him in a maze along the patterned paths...

Amy Lowell, "Patterns"

The power of regular expressions as a computing tool has often been underestimated. From their earliest theoretical beginnings in the 1940s, they found their way onto computer systems in the 1960s and from there into various tools in the UNIX operating system. In the 1990s, the popularity of Perl helped make regular expressions a household item rather than the esoteric domain of bearded gurus.

The beauty of regular expressions is that almost everything in our experience can be understood in terms of patterns. Where there are patterns that we can describe, we can detect matches; we can find the pieces of reality that correspond to those matches; and we can replace those pieces with others of our own choosing.

As this is being written, Ruby is in flux. The regular expression engine is slated to be replaced with the new one named Oniguruma. A later section of the chapter (section 3.13, "Ruby and Oniguruma") is devoted to this newer engine. As for internationalization, most specific issues related to that are dealt with in Chapter 4, "Internationalization in Ruby."




The Ruby Way(c) Solutions and Techniques in Ruby Programming
The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition)
ISBN: 0672328844
EAN: 2147483647
Year: 2004
Pages: 269
Authors: Hal Fulton

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net