 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Developer Tutorials Blog: Learn regular expressions in PHP
by Chris Cornutt May 01, 2008 @ 08:48:05
On the Developer Tutorials blog, Akash Mehta offers some suggestions of resources and methods for learning how to use regular expressions in your PHP applications.
When it comes to quickly dealing with large blocks of data, batch processing operations or screen scraping, regular expressions are often the most effective solution. There's just one problem, though - learning them can be as hard as learning a new language altogether. Here's how to get off to a flying start.
He points you first in the direction of the preg_* functions then towards a few examples (like with mod_rewrite) and tools to help you understand how things match, like the regex tested extension for firefox and the regular expression cheat sheet on ILoveJackDaniels.com.
voice your opinion now!
learn regular expression preg firefox extension cheatsheet
Gareth Heyes' Blog: Regular expression challenge
by Chris Cornutt October 19, 2007 @ 14:48:00
Gareth Heyes has posted another challenge to his blog - this time it involves using a regular expression to convert the inputted string into the output he's given.
After the success of my "a bit of fun" challenge, a few people asked for some more challenges. So I was answering a question on a mailing list that I'm a member of and I thought it would be a good topic for a little challenge and help sharpen everyone's regular expression skills.
This time, his challenge involves taking the input, rail start/end locations from an array and, via the PHP script given (no regular expression in it, of course) make the output, a sort of JSON formatted message. It's already been answered, but if you want to, try it yourself first then read the answer below the post.
voice your opinion now!
regular expression challenge input output match regular expression challenge input output match
Tiffany Brown's Blog: A better RegEx pattern for matching e-mail addresses
by Chris Cornutt December 13, 2006 @ 08:15:00
Though not specifically related to PHP, I wanted to share a helpful tip that Tiffany Brown has posted to her blog today - a nice, compact regular expression to handle the matching of email addresses.
A few weeks ago, I posted a regular expression pattern < href="http://tiffanybbrown.com/2006/11/09/a-pattern-for-matching-e-mail-addresses/">for matching e-mail addresses. Below is a more refined version:
^[-+.w]{1,64}@[-.w]{1,64}.[-.w]{2,6}$
Not only does it match the traditional email address formats, but it also will match addresses with periods in the name, British domains, and new TLDs like '.travel' or '.museum'.
voice your opinion now!
regular expression match email address refined regular expression match email address refined
|
Community Events
Don't see your event here? Let us know!
|