Japan Interface - Computer bookshelf

20 items found in PHP.
Displaying page 4 out of 4.

Mastering Regular Expressions, 2nd Edition

Jeffrey Friedl

O'Reilly, 2002

book coverEverything you ever wanted to know about regular expressions - and more. Jeffrey Friedl's book turns a complex and dry subject into pleasant reading. Even after just the first two chapters, I found the veils of mystery lifting, and regular expressions far more approachable. Essential for anyone who wants to master the power of regular expressions and avoid creating "solutions" that cause more problems than they're worth.

Be warned, though, this is not a book for faint hearts. On my first read-through, I decided to stop after the second chapter, as I didn't want to be overwhelmed. I felt armed with sufficient information to get me both interested and to start experimenting on my own. After several months, I returned and read just over half the book. I learned a lot more, but it left my head spinning. That's no criticism of Jeffrey Friedl's approach - he admits it's heady stuff and takes a long time to sink in.

A sound knowledge of regular expressions is essential if you want to move beyond the basic level of JavaScript, PHP or any other scripting language. They are patterns that search through text and data files matching and manipulating whatever it is you're looking for - just like the wildcard characters . and *, but far more precise and powerful. Unfortunately, each programming language implements a different set of utilities, although the most widely used ones come from Perl. Friedl's book covers them all, which can be frustrating if you're interested in learning to use regexes in only one environment, such as JavaScript. It's worth persisting, though, and following Friedl's advice that the most important step towards mastering regular expressions is understanding how the main search engines work. Once you know that, you can come back and study the details, and begin to use more sophisticated techniques such as lookahead and lookbehind. Like learning a foreign language, fluency only comes with constant practice, and this is the essential grammar book you need to keep coming back to.

The book is full of practical examples, and Friedl pops in the occasional quiz that really helps consolidate understanding. Not an easy book, nor an easy subject, but both definitely worthwhile.

PHP Developer's Cookbook

Sterling Hughes & Andrei Zmievski

Sams, 2001

book coverCollection of useful PHP routines, each accompanied by an explanation of how it works. The book is divided into logical sections, making it easy to find solutions to problems dealing with arrays, strings, dates, database connnection, etc. It assumes considerable familiarity with PHP, and is aimed more at the power user than the casual scripter.

© 2002-5, Japan Interface. All rights reserved.