Forum Moderators: coopster
$string = "<A HREF=534/533.html></A><A HREF=884/53333.html></A>";
$pattern = "/HREF=[0-9]/i";
$replacement = "HREF=../cgi-bin/getfile.cgi?$1";
My idea is for every link that whose first digit is a numeral to append the fixed string in front of that and then match the rest.
For some reason, this doesn't seem like it'll work. Maybe the pattern is not complete?