RewriteCond %{REQUEST_URI} ^(.*)/(2\d{3})(-.*)$
RewriteCond %{TIME_YEAR}_%2 !^(\d+)_\1$
RewriteRule ^ https://%{HTTP_HOST}%1/%{TIME_YEAR}%3 [R=301,L]%{TIME_YEAR} -gt $2RewriteCond expr "%{REQUEST_URI} =~ m#^(.*)/(2[0-9]{3})(-.*)$# && %{TIME_YEAR} -gt $2"
RewriteRule ^ https://%{HTTP_HOST}%1/%{TIME_YEAR}%3 [R=301,L] Options -Indexes
ErrorDocument 404 /404.php
<IfModule mod_php5.c>
php_flag allow_call_time_pass_reference 1
php_flag session.use_trans_sid off
#php_value display_errors 1
#php_value mbstring.internal_encoding UTF-8
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpe?g|png|ico|webp)$
RewriteRule ^(.*)$ https://site.ru/$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpeg "access plus 3 day"
ExpiresByType image/gif "access plus 3 day"
</IfModule> 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] $str = "Первая строка.\r\nВторая строка.\r\n\r\nЧетвертая строка.";
$str = preg_replace('#^([^\r\n]*)(\r?\n|\z)#m', '<p>$1</p>$2', $str);
echo $str;{{.*?}}const s = "Это какой-то тексст {{param1}} дорогие пупсики {{param2}} и нужно из него {{param3}} выдернуть параметры"
console.log(s.match(/{{.*?}}/g))xmlmiddle(\d{19})
xmlmiddle\d{19}(?s).*?xmlmiddle(\d{19})
xmlmiddle\d{19}(?s).*?xmlmiddle\d{19}.*?xmlmiddle(\d{19})\d{19}(?<=xmlmiddle\d{19})
\d{19}(?<=(?s)xmlmiddle\d{19}.{40,200}?xmlmiddle\d{19})
\d{19}(?<=(?s)xmlmiddle\d{19}.{40,200}?xmlmiddle\d{19}.{40,200}?xmlmiddle\d{19}) const s = "say \"hello world\""
const r = s.match(/"[^"]*"|[^\s"]\S*/g).map(m => m.replace(/^"|"$/g, ''))
console.log(r)import re
s = "say \"hello world\""
r = []
for m in re.finditer('"([^"]*)"|[^\s"]\S*', s):
if m.group(1) is None:
r.append(m.group(0))
else:
r.append(m.group(1))
print(r) .replace(/.*?([A-Z]+) +([A-Z]+).*/, '$1 $2').replace(/^ +|[^A-Z ]/g, '').replace(/ +(\w*).*/, ' $1') $line = "text <p>text \n\n \n text \n text </p> text \n\n \n text\n";
$line = preg_replace('#(?:^|</p>).*?(?:\z|<p>)(*SKIP)(*F)|\n#is', '<br />', $line);
echo $line; # line below if for Apache 2.4
<ifModule mod_authz_core.c>
Require all granted
</ifModule>
# line below if for Apache 2.2
<ifModule !mod_authz_core.c>
allow from all
</ifModule> RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?module=$1 [L]RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?%{QUERY_STRING}&module=$1 [L]