【发布时间】:2023-03-27 01:16:01
【问题描述】:
<p[^>]*>([a-zA-Z0-9_\W]*)\:<\/p>.*?(<blockquote[^>]*>).*?<\/blockquote>
<p> demo demo:</p> <p ><img src="http://demo.com/123.jpg" width="100%"/> <br/> <em>Credit: demo2 demo2 </em></p> <p >here1 here1:</p> <blockquote cite="here1"> <p><em>demo3. demo3 demo3 demo3:</em></p> </blockquote> <p >demo4 demo4:</p> <p ><img src="http://demo.com/1234.jpg" width="100%"/> <br/> <em>demo5 demo 5 demo5</em></p> <p >demo6 demo6:</p> <blockquote cite="demo6"> <p><em>demo7 demo7<br/>
上述模式出现故障。我在哪里可以犯错误。我上面写的模式,我不能在一个句子中选择我想要的。帮助请求。
我想得到结果:
<p >here1 here1:</p> <blockquote cite="here1"> <p><em>demo3. demo3 demo3 demo3:</em></p> </blockquote>
【问题讨论】:
-
请包含一个文本示例,而不是图像。
-
谢谢迈克尔。我添加了图像。请见:i.stack.imgur.com/UtQQL.png
-
我将代码添加为文本。
-
使用 html 解析器而不是正则表达式。
标签: html regex asp-classic tags