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

Zend Starts in on Regular Expressions
Oct 30, 2002 @ 13:36:34

Regular expressions are the bane of many a young developer's existence - confusing syntax that doesn't seem to work right the first two-hundred times that you work with it, and problems matching exactly what you want out of a string, and getting it to match all of the string - the list goes on and on. Well, hopefully, this new Code Gallery Spotlight from Zend.com will help those out there still struggling with these powerful tools in PHP.

In this Spotlight, they start you off slow, showing you how to match whole words, like "apple" in a sentence. Then, they start getting into the reserved characters that you can use, like ^ and $ to help you match just exactly what you need from a string. They even give you a sample email validation regular expression at the end of the piece that will validate just about anything that you throw at it to see if it's a valid email address.

tagged:

Link:


Trending Topics: