Re: Help with Regular Expressions

From: Date: Sun, 15 Aug 2004 14:51:16 +0000
Subject: Re: Help with Regular Expressions
Groups: php.general 
Request: Send a blank email to php-general+get-193881@lists.php.net to get a copy of this message
Hi all, I am working on a small php script which should do the following. I want all the links in the page to be preceded by first character and first two characters of the link.Please look into the example below for more clarification. eg. <a href="/code.html">link here</a> to be replaced as <a href="/c/co/code.html">link here</a> I guess, this is possible by using regular expressions but I am not able to crack the right expression. Any help would be highly appreciated in this regards. Cheers, Killu ________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony

« previous php.general (#193881) next »