简体   繁体   中英

PHP regex needed

So far this captures everything i need ending with 'em' i need regex to capture paragraphs ending in 'ppp' also.

My regex:

%<h2>Storyline</h2>(.*)em%s

我建议不要使用正则表达式来解析HTML,但这看起来很容易,因为您实际上并未将其解析为HTML ...

%<h2>Storyline</h2>(.*?)(?:em|ppp)%s

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM