News Feed
Sections




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

Gareth Heyes' Blog:
Regular expression challenge
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.

1 comment voice your opinion now!
regular expression challenge input output match regular expression challenge input output match


blog comments powered by Disqus

Similar Posts

Derick Rethans: Questions from the Field: Should I Escape My Input, And If So, How?

Arnold Daniels' Blog: How I PHP: The Output Handler - Continued

AddedBytes.com: Regular Expressions Cheat Sheet

Dikini.net: Rewriting macros - the peculiar case of php

Jonnay\'s Blog: Introducing BunnyRegex - easy regular expressions, and mini-languages inside of PHP.


Community Events

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


framework introduction series php7 example project opinion yii2 podcast application api programming language composer laravel symfony community interview list part2

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