$str = 'abaabaaabaabaaaa';
$out = preg_split('~(?<!a)aa(?!a)~', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($out);
<LimitExcept POST>
deny from all
</LimitExcept>
$pattern = '/[\w.%+-]+@(?:[a-z\d-]+\.)+[a-z]{2,}|\[mailto:[^\]]+(*SKIP)(*F)/i';
$str = preg_replace($pattern, '[mailto:$0]', $str);
RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} !(^|&)srp=
RewriteCond %{QUERY_STRING} !(^|&)srk=
RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteCond $2 ^(?!/amp/).+ [OR]
RewriteCond &%{QUERY_STRING} ^(?!.*&srp=)(?!.*&srk=)&.+
RewriteRule ^(.+?)\.html(.*)$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} SemrushBot-SA|rogerbot|megaindex\.com
RewriteRule ^ - [F]
<VirtualHost>