Jump to content

Can't preg_replace %3a%2f%2f with ://


nicob

Recommended Posts

btw

 

$string = '<a href="http%3a%2f%2fwww.hello.com">';
$string = preg_replace("/%3a%2f%2f/", "://", $string);

 

works fine for me.

 

strange. I'm using this in a script with multiple replacements

$rep = preg_replace($listone, $listtwo, $val);

 

I'm using php v5.2.5

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.