public function docheckHarassLineOfStart($lineOfWords,$message){
if(!Verify::unsignedInt($lineOfWords)){
return false;
}
preg_match_all('/([.\n\r]+)/i', $message,$matches);
$line = count($matches[0])+1;
if($line < $lineOfWords){
return false;
}
return true;
}
大家看一下我写的是一个匹配换行符的方法,但我发现不匹配空白行
比如
a
b
c';
匹配的是3行
但
a
b
c
匹配的也是3行,我想把空白行也算进去怎么改?