O'Reilly logo

Sams Teach Yourself PHP in 24 Hours, Third Edition by Matt Zandstra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Perl Compatible Regular Expressions

Perl is a powerful scripting language. It was originally designed as a replacement for more limited Unix shell tools, and one of its core features is an extended regular expression engine. PHP provides support for the Perl regular expression syntax, giving you a suite of flexible tools for managing and transforming text.

A regular expression is a combination of symbols that match a pattern in text. Learning how to use regular expressions, therefore, is much more than learning the arguments and return types of PHP’s regular expression functions. We will begin with the functions and use them to introduce regular expression syntax.

Matching Patterns with preg_match()

preg_match() accepts four arguments: a regular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required