我想解析文本。有一个奇怪的句子,就像B R I E F I N G S I N B I O I N F O R M A T I C S
我想跳过那个句子一样。这是代码
<?php
$text = 'B R I E F I N G S I N B I O I N F O R M A T I C S. Because many biomedical entities have multiple names and abbreviations, it would be advantageous to have an automated means to collect these synonyms and abbreviations to aid users doing literature searches.';
$reg = '/(?<=[.!?]|[.!?][\'"])\s+/';
foreach(preg_split($reg, $text, -1, PREG_SPLIT_NO_EMPTY) as $sentence){
foreach(preg_split('/\s+/', $sentence) as $words){
if (count(strlen($words)>1)){
//I don't know what to do
}
}
}
?>
但是,它仍然是错误的,如何识别模式句B R I E F I N G S I N B I O I N F O R M A T I C S
?谢谢你