u
, так что \w
совпадало только с латиницей.u
и [\w\s()\/.]+
стал захватывать текст на русском.u
, а \w
заменить на [a-zA-Z]
.$nomenclature = "4590 Ламінат Fiori Aqua Zero Дуб Iris фаска (1,67 м2)/5 шт";
preg_match("/^(К?[0-9\s]+).*?Ламінат\s([a-zA-Z\s()\/.]+|Х Galaxy 4V)\s([\p{L}\s.']+)/u", $nomenclature, $out);
var_dump($out);
(di|-m|r |s )
rewrite ^/api/ /index.php?id=131 last;
RewriteRule ^ru(?:/(.*))?$ /$1 [L,R=301]
AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[^?]+//
RewriteRule ^(.*)$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
RewriteCond %{REQUEST_URI} !^/folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^.*$ $0.php [L,QSA]
RewriteCond %{REQUEST_URI} !^/folder/
RewriteCond %{THE_REQUEST} (\S+)\.php
RewriteRule ^ %1 [R=301,L]
RewriteCond %{THE_REQUEST} ^\S+\s/flowers\.php
RewriteRule ^ https://my.site/my-flowers [R=301,L]
RewriteRule ^my-flowers$ /flowers.php [L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^flowers\.php https://my.site/my-flowers [R=301,L]
RewriteRule ^my-flowers$ /flowers.php [L]
RewriteCond %{QUERY_STRING} ^(|.*?&)param1=[^&]*&?(.*)
RewriteRule .* /$0?%1%2 [R=301,L]
AddType application/x-httpd-php .html .htm
if ($request_uri ~ "/index\.htm") {
return 301 /;
}
if ($request_uri ~ "^([^.?]+)\.htm") {
return 301 $1;
}
location / {
try_files $uri $uri/ $uri.htm$is_args$args;
}
location ~ \.htm {
try_files $uri =404;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}