<?php
$text = "привет.есть 2 функции,preg_split и explode ,не понимаю,в чем между ними разница." ;
$regexp = [
"/[ ]?+[,]([a-z|а-я])/ui" => ", $1 " ,
"/([.!?])([a-z|а-я])/ui" => "$1 $2 "
] ;
foreach ( $regexp as $wrong => $right ) {
}
PD9waHAKJHRleHQgPSAi0L/RgNC40LLQtdGCLtC10YHRgtGMIDIg0YTRg9C90LrRhtC40LgscHJlZ19zcGxpdCDQuCBleHBsb2RlICzQvdC1INC/0L7QvdC40LzQsNGOLNCyINGH0LXQvCDQvNC10LbQtNGDINC90LjQvNC4INGA0LDQt9C90LjRhtCwLiI7CgokcmVnZXhwID0gWyAKCQkiL1sgXT8rWyxdKFthLXp80LAt0Y9dKS91aSIgPT4gIiwgJDEiLAoJCSIvKFsuIT9dKShbYS16fNCwLdGPXSkvdWkiID0+ICIkMSAkMiIgCl07CmZvcmVhY2ggKCAkcmVnZXhwIGFzICR3cm9uZz0+JHJpZ2h0ICkgewoJJHRleHQgPSBwcmVnX3JlcGxhY2UgKCAkd3JvbmcsICRyaWdodCwgJHRleHQgKTsKCXByaW50X3IoIiR0ZXh0XG4iKTsKfQ==