Home > Backend Development > PHP Tutorial > 新手求教,复杂的正表达式,求高手指点

新手求教,复杂的正表达式,求高手指点

WBOY
Release: 2016-06-23 14:01:02
Original
943 people have browsed it

"第\s?1-60\s?个\s?共有很多个"

怎么匹配出 1  60 很多  

匹配了很久了,就是出不来,求高手指点


回复讨论(解决方案)

$str = "第\s?<b>1</b>-<b>60</b>\s?个\s?共有<b>很多</b>个";$b = html_entity_decode($str);preg_match_all("/\d+|很多/", $b, $match);var_dump($match);
Copy after login

多谢,完全正确

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template