Learn to use one of the most powerful text processing and manipulation tools available Regular expression experts have long been armed with an incredibly powerful tool, one that can be used to perform all sorts of sophisticated text processing and manipulation in just about every language and on every platform. That’s the good news. The bad news is that for too long, regular expressions have been the exclusive property of only the most tech savvy. Until now. Ben Forta's Learning Regular Expressions teaches you the regular expressions that you really need to know, starting with simple text matches and working up to more complex topics, including the use of backreferences, conditional evaluation, and look-ahead processing. You’ll learn what you can use, and you’ll learn it methodically, systematically, and simply. Regular expressions are nowhere near as complex as they appear to be at first glance. All it takes is a clear understanding of the problem being solved and how to leverage regular expressions to solve them. Read and understand regular expressions Use literal text and metacharacters to build powerful search patterns Take advantage of advanced regular expression features, including lookahead and backreferences Perform powerful search-and-replace operations in all major professional editing tools Add sophisticated form and text processing to web applications Search for files using command-line tools like grep and egrep Use regular expressions in programming languages like JavaScript, Java, PHP, Python, Microsoft .NET, and C#, as well as in DBMSs including MySQL and Oracle Work with phone numbers, postal codes, social security numbers, IP addresses, URLs, email addresses, and credit card numbers Contents at a Glance 1 Introducing Regular Expressions 2 Matching Single Characters 3 Matching Sets of Characters 4 Using Metacharacters 5 Repeating Matches 6 Position Matching 7 Using Subexpressions 8 Using Backreferences 9 Looking Ahead and Behind 10 Embedding Conditions 11 Regular Expression Solutions to Common Problems Appendix A Regular Expressions in Popular Applications and Languages
Ben Forta is an author and Senior Technical Evangelist for Adobe Systems, particularly ColdFusion and Flex, and the owner of EmTek Systems. He previously worked in a similar capacity for Macromedia and Allaire Corporation, the two previous owners of ColdFusion.
In addition to writing numerous technical books on ColdFusion, SQL, and Regular Expressions, Forta co-authored Adobe's official ColdFusion training materials and certification tests and lectures on application development around the world. Many of his books have been translated into over a dozen languages worldwide.
Before working for Allaire, he founded the website Car.com, which was later purchased by Auto-By-Tel. Born in London, England, Forta lives in Oak Park, Michigan with his wife and their children.
that's a wonderful book. i read it in 2-3 days from cover to cover (expect the appendix A). the book consists of 10 lessons on various aspects of regex with lots of examples and tips. almost every thing told in this book is showed by a problem (comes in plain text), a regex pattern and the result extracted from problem. i should also mentions that there's an extra lesson, which is about usages of regex in real world problems. the appendix covers regex implementations on different programming languages.
This is probably the best technical book I've read in terms of readability. I was easily able to keep myself focused and follow along with the text. The only downside was that I found a couple of mistakes and I found his unanswered questions frustrating. I figured I paid enough money for him to answer all the questions, haha!