Skip to Content
PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth Edition
book

PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth Edition

by Larry Ullman
September 2011
Intermediate to advanced
696 pages
21h 29m
English
Peachpit Press
Content preview from PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth Edition

14. Perl-Compatible Regular Expressions

In This Chapter

Creating a Test Script 434

Defining Simple Patterns 438

Using Quantifiers 441

Using Character Classes 443

Finding All Matches 446

Using Modifiers 450

Matching and Replacing Patterns 452

Review and Pursue 456

Regular expressions are an amazingly powerful (but tedious) tool available in most of today’s programming languages and even in many applications. Think of regular expressions as an elaborate system of matching patterns. You first write the pattern and then use one of PHP’s built-in functions to apply the pattern to a value (regular expressions are applied to strings, even if that means a string with a numeric value). Whereas a string function could see if the name John is in some text, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition

Larry Ullman

Publisher Resources

ISBN: 9780132767576Purchase book