View Full Version : reg expres

04-30-2009, 08:04 AM
Hi all was wondering if there was a way to use preg_replace to find lets say, any anchor tag and then add a space on the end?

$start = "><a";
$end = ">";
$start2 = "> <a";
$end2 = "> ";
$data = preg_replace("/(?<=$start).*(?=$end)/m", "/(?<=$start2).*(?=$end2)/m", $data,);

Any ideas?

04-30-2009, 08:05 AM
(that just replaces the tags with gobbldy goope, obviously) :p

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum