Clrs
Clrs

php using regx to replace domain

php using regx to replace domain

use regx replace ‘
https://www.clrs.me/abc/index’
to ‘
https://www.muker.club/abc/index’


$a = preg_replace('/(https):\/\/([^\/]+)/i', 'https://www.muker.club','https://www.clrs.me/abc/index');

echo $a;

result is
https://www.muker.club/abc/index


Clrs

php using regx to replace domain
use regx replace ‘https://www.clrs.me/abc/index'to ‘https://www.muker.club/abc/index' $a = preg_replace('/(https):\/\/([^\/]+)/i', 'https://www.muker.club','https://w…
扫描二维码继续阅读
2022-04-03