使用Notepad++,这是用<p>标记包装HTML <img ... />标记,但是每个完整的<img ... />字符串包含不同的字符。
我想要做的是使用Notepad++的“查找”工具来查找每个<img ... />标签,然后使用“替换”来用<p></p>标签包装每个<img ... />。
这是为了比手工包装<img>标签更快。
示例:
找到...
<img src="https://example.com/image-icon-9.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" />
<img src="https://example.com/image-icon-12.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" />
<img src="https://example.com/image-icon-5.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" />
<img src="https://example.com/image-icon-8.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" />替换为使用<p>标记包装<img ... />标记
<p><img src="https://example.com/image-icon-9.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" /></p>
<p><img src="https://example.com/image-icon-12.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" /></p>
<p><img src="https://example.com/image-icon-5.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" /></p>
<p><img src="https://example.com/image-icon-8.jpg" alt="text here" class="alignleft size-full" title="test-here" width="50" height="50" /></p>有什么建议吗?
谢谢
发布于 2021-07-10 13:32:22
https://stackoverflow.com/questions/68324931
复制相似问题