#^(\S+ \S+ \S+) .+?: (\S+?)\/(\S+).+? IPv4=([\d.]+)#
$text = preg_replace_callback(
'#\[url\]([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)([\r\n]*)\[/url\]#si',
function ($m) use($pathto) {
$link = $m[2].$m[3];
return "<a href='$pathto"
.base64_encode($link)
."' rel='nofollow' target='_blank' title='$link'>"
.trimlink($link, 20)
.(strlen($link)>30?substr($link, strlen($link)-10, strlen($link)):'')
.'</a>';
},
$text
);
RewriteRule ^cat1/((.).+) https://site.ru/cat2/$2/$1 [R=301,L]
(?=...) look ahead
(?xi) установка внутренних опций
https://www.php.net/manual/ru/regexp.reference.del...