News Feed
Sections




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

Debuggable Blog:
String substitution using UUIDs
August 22, 2008 @ 12:04:39

On the Debuggable blog, Felix Geisendorfer shows how to create a string parser that allows you to pull out parts of the string you don't currently want manipulated to be put back later.

If you've ever written any non-trivial String processing code, you've probably ran into the situation where you wanted to exclude certain parts of your string for a certain operation. Usually that would mean you have to tokenize your string, or adjust the operation you want to run so it doesn't affect the part of the string you want to exclude from it. Both of those solutions can be fairly time intensive so I was looking for a shortcut and found one.

He provides the code for this string substitution class, a method substitute() that matches based on a regular expression and, if found, stores the parts for later use.

0 comments voice your opinion now!
string substitution uuid manipulation regularexpression


blog comments powered by Disqus

Similar Posts

Brian Moon's Blog: Short Array Syntax for PHP

Sameer Borate's Blog: Search & replace in files using php

NetTuts.com: SOLID: Part 3 - Liskov Substitution & Interface Segregation Principles

PHPit.net: Image manipulation with PHP & the GD library (Part 1)

The Bakery: Four New Articles - Load Balancing, Request Info, UUID Behavior & Upload Thumbnails


Community Events

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


conference interview laravel install opinion release example configure application symfony2 community performance php7 introduction language library framework api podcast series

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