正则提取选项偶遇

<li class="list-group-item"><b>题文:</b>  4.已知某扇形的面积为<img src="/upload/word/57680275bcf0b6a839384c6480e0af36.png" style="height:auto">,若该扇形的半径<img src="/upload/word/d452629594b058b78eba1fe55eb3b5ac.png" style="height:auto">,弧长<img src="/upload/word/57b4da4d396ff14b1f76cd9c2d3b6254.png" style="height:auto">满足<img src="/upload/word/4e57454c31274c7e38b4450fcc89e3b1.png" style="height:auto">,则该扇形圆心角大小的弧度数是()
A.<img src="/upload/word/9d27aaaad550b71d8366a1dbc4f3fedA.png" style="height:auto"/>
B.<img src="/upload/word/80a9d43aae805fdd22361a7020614342.png" style="height:auto"/>
C.<img src="/upload/word/8ca1d7a7c4e997025fb882e90977f37b.png" style="height:auto"/>
D.<img src="/upload/word/9d27aaaad550b71d8366a1dbc4f3feda.png" style="height:auto"/>或<img src="/upload/word/80a9d43aae805fdd22361a7020614342.png" style="height:auto"/></li>

使用的正则表达示如下:

$pattern_options = "~(.*)A\.(.*)B\.(.*)C\.(.*)D\.(.*)~Si";		    
preg_match_all($pattern_options, $items[5][0], $option_matches);
$content = $option_matches[1][0];

但这个正则不能正确类似A选项中重复”A.”的问题,到底应该怎么写这个正则,才能正确匹配呢?

发表评论

电子邮件地址不会被公开。 必填项已用*标注