Before you start
Learn what to expect from this tutorial, and how to get the most out of it.
About this tutorial
Regular expressions can provide a powerful way to work with text. Using regular expressions, you can do complex validation of user input, parse user input and file contents, and reformat strings.
Back to top
Objectives
This tutorial will get you up and running with PHP's regular expressions by focussing on simple methods that let you use POSIX and PCRE regular expressions. We will discuss the differences between POSIX and PCRE, and how you can use regular expressions and PHP V5. You'll learn how, when, and why to use regular expressions.
Back to top
System requirements
You'll be able to complete this tutorial on any Microsoft® Windows® or UNIX®-like system (including Mac OS X and Linux®) that has PHP installed. Because we're covering what's built into PHP, you won't need anything more than PHP installed on your system.
1 of 11 |
Next
Comments
Back to top
Help: Update or add to My dW interests
What's this?
This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.
And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.
View your My developerWorks profile
Return from help
static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=133632
TutorialTitle=How to use regular expressions in PHP
publish-date=01102006
author1-email=mail@nathanagood.com
author1-email-cc=