<?php
header('Content-Type: text/html; charset=utf-8');
$pattern='/[^0-9A-Za-z_]/';
$string='! $@!#%$#^##';
if(preg_match($pattern, $string,$match)){
echo '???, ??? ??? ????.';
var_dump($match);
}
else {
echo 'No match';
}
?>
??: ??, ??? ??? ????: array(1) { [0]=> "!" $ [^0-9A-Za-z_] ??? ???? ?? ???? ??? ? '!' ??? ??????
preg_match()? ? ?? ?????. ??? ???? ???? ???? ?? ???? ??? ??? ???? ?? ???? ???? ?? ???? ????.
preg_match()? ? ?? ?????. ??? ???? ???? ???? ? ?? ???? ????. ??? ???? ?? ???? ?????? preg_match_all($pattern, $string, $arr)? ??? ? ????. , $arr? ???? ?? ???? ?????