Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DotGeek.org:
Introduction to Regular Expressions
Jan 08, 2004 @ 13:23:03

DotGeek.org has a new posting this morning for everyone out there struggling with regular expressions and might need that extra helping hand - Introduction to Regular Expressions.

This tutorial promises to introduce you to the wonderful world of regular expressions, and the many benefits it has when you need to check, edit, or in other way handle strings. They dive right in with the example of checking to ensure tags are closed in a HTML document. They show a simple way to check, but it has its flaws, so they move forward. They then give you some of the syntax of the regular expressions (grouping, match modifiers, etc) and update the regular expression example with some of these to make it work better. Of course, they explain what everything is doing in quite a bit of detail (a *very* good thing), and step you through how it all works.

Regular expressions are one of the more difficult things for coders new to PHP to learn. This article does a pretty good job of giving an introduction - I just wish that the grouping, pattern modifiers, etc had been closer to the top so people would know what all of those characters stand for.

tagged:

Link:


Trending Topics: