News Feed
Sections




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

Kevin Waterson's Blog:
Introduction to PHP Regex
September 09, 2008 @ 12:59:06

Kevin Waterson has posted an extensive tutorial to his site today giving a great look at regular expressions in PHP (and just regular expressions in general).

At its most basic level, a regex can be considered a method of pattern matching or matching patterns within a string. In PHP the most oft used is PCRE or "Perl Compatible Regular Expressions". Here we will try to decypher the meaningless hieroglyphics and set you on your way to a powerful tool for use in your applications. Do not try to understand all this in a single sitting. Instead, take in a little and come back as you grasp various concepts.

He starts with simple string matching, showing how to get values from the middle, end and beginning of it then moves on to the next more powerful step - using meta characters. He outlines these as well as sequences and modifiers. There's plenty of examples here so there's almost no chance of getting lost.

It's a great tutorial that I'd recommend to anyone who things regular expressions are "just too hard" or it looking to figure out their power.

0 comments voice your opinion now!
introduction tutorial regularexpression regex beginner


blog comments powered by Disqus

Similar Posts

LotsOfCode.com: Tag Cloud Tutorial

IBM developerWorks: Cook up Web sites fast w/CakePHP, Part 1: Adding related information & services

Jurian Sluiman: Using Zend Framework service managers in your application

Michelangelo van Dam: Running Apigility on Azure

Vid Luther's Blog: Using your Mac as a local web development environment.


Community Events





Don't see your event here?
Let us know!


package introduction update voicesoftheelephpant mvc podcast symfony framework library interview laravel opinion series release language community version composer tool security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework