O'Reilly logo

Wicked Cool PHP by Brian Ward, William Steinmetz

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

#39: Regular Expressions

Sooner or later, you'll have to roll up your sleeves and learn about regular expressions, which are the most powerful tools available for matching text. Want to find all the words within angle brackets in order to strip HTML code out of a string? You'll need regular expressions. Want to find any IP addresses in a string? Want to make sure a user-chosen password isn't just a sequence of numbers (like 123456) or that it contains a mixture of uppercase and lowercase letters? Trying to sort through bad data in a database, and it turns out that your data entry people have listed a product's condition as nearmint, near/mint, near mint, and near-mint? You can use regular expressions to do all of these tasks.

However powerful 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