preg_replace("/\b".$isUp[$i]."\b/iu",$noUp,$titleNew);
$noUp нужно $noUp[$i]$title = 'maximum best program for you - this is a 3d max - super puper program';
$array = array("3D","4K","MAX","PROGRAM");
foreach ($array as $word) {
$title = preg_replace('/\b'.$word.'\b/iu', $word, $title);
}
echo $title; // maximum best PROGRAM for you - this is a 3D MAX - super puper PROGRAM | в регулярке (http|https)When using the regex / not_regex patterns, it may be necessary to specify rules in an array instead of using|delimiters, especially if the regular expression contains a|character.
RewriteEngine on
RewriteCond %{ENV:REDIRECT_STATUS} !^$
RewriteRule ^ - [L]
RewriteCond %{QUERY_STRING} (?:^|&)p=(\d+)(?:$|&)
RewriteRule ^ /%1? [R]
RewriteCond %{QUERY_STRING} (?:^|&)category=([^&]+)
RewriteRule ^(\d+)$ /$1/%1? [R]
RewriteRule ^(\d+)$ index\.php?p=$1
RewriteRule ^(\d+)/(.+)$ index\.php?p=$1&category=$2/index.php?p=123 или /?p=123 перенаправить на /123/123?category=abc перенаправить на /123/abc/123/abc перенаправить в index.php?p=123&category=abc There are a couple of things which are not supported yet (like %{REQUEST_FILENAME}) but we hope to add them in the future.
RewriteRule ^(.*)$ https://%{HTTP_HOST}%1/%2%3 [R=301,L]RewriteCond %{REQUEST_URI} ^(.*)/(2\d{3})(-.*)$
RewriteCond %{TIME_YEAR}_%2 !^(\d+)_\1$
RewriteRule ^ https://%{HTTP_HOST}%1/%{TIME_YEAR}%3 [R=301,L] RewriteEngine on
RewriteCond %{THE_REQUEST} " /projekts/([^/]+)/page\.html"
RewriteRule ^ https://site.co.ua/%1 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/projekts_/$1/page.html -f
RewriteRule ^([^/]+)$ /projekts_/$1/page.html [L]
Возможно в начале строки есть пробелы?
Тогда так
^\h*\S+\h+(\S+)[^\n]+https://regex101.com/r/cfGcFI/1