I\'m trying to replace all link href\'s in a large string with a different URL. With the following code It seems to replace only the 2nd link leaving the first one intact, c
Instead of any char . use any not (^) quote [^"]
.
[^"]
echo preg_replace('//','',$string_of_text);