The Artima Developer Community
Sponsored Link

Web Buzz Forum
PHP Regular Expression Clinic

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Douglas Clifton

Posts: 861
Nickname: dwclifton
Registered: May, 2005

Douglas Clifton is a freelance Web programmer and writer
PHP Regular Expression Clinic Posted: Aug 14, 2005 11:57 AM
Reply to this message Reply

This post originated from an RSS feed registered with Web Buzz by Douglas Clifton.
Original Post: PHP Regular Expression Clinic
Feed Title: blogZero
Feed URL: http://loadaveragezero.com/app/s9y/index.php?/feeds/index.rss1
Feed Description: Web Development News, Culture and Opinion
Latest Web Buzz Posts
Latest Web Buzz Posts by Douglas Clifton
Latest Posts From blogZero

Advertisement

pcre The loadaverageZero Apache log files are full of instances of people searching for regular expression tutorials. Probably because I list several good ones, and the search engines oblige me by indexing them.

Somehow, I missed Andrei Zmievski's PHP Regular Expression Clinic. And it's easily the best of the lot. If you're not familiar with Andrei's work, he's been the principal PHP developer since 1999, works as a member of the Core Software Infrastructure team at Yahoo!, is the author of the PHP Developer's Cookbook, the PHP-GTK GUI Toolkit extension, and is co-author of the Smarty templating engine.

He also happens to be the guy who wrote the PCRE PHP extension. That's quite a resume. Now don't assume he wrote the PCRE library itself, that distinction belongs to Philip Hazel. And PHP is by no means the only software that uses the PCRE library, you can find it as part of Apache, Python, and many other interesting open-source projects. And we can't forget about Perl itself, although it obviously doesn't need a compatibility library.

Some advice for Web developers: regular expressions are powerful, but they come at a price. I have seen countless examples of code that could easily have been implemented using standard string search and comparison functions. Use regular expressions only when you need to, and when you do, use the preg family of functions because they are faster, and more powerful. In my opinion, the extended regex (ereg) functions should be removed from the PHP core. If people really want to use them, they can compile them in or access them as a runtime extension.

The Clinic is available in the following formats:

Read: PHP Regular Expression Clinic

Topic: Archos PMA400 Previous Topic   Next Topic Topic: Sharing Church ICT Resources

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use