搜索
<img src="images/foo.jpg" alt="" title="caption here" class="figure" />
用。。。来代替
<img src="images/foo.jpg" alt="" title="caption here" class="figure" /><figcaption>caption here</figcaption>
或者只是(我的第二选择,足够好)
<figcaption>caption here</figcaption>
如何使用正则表达式搜索和替换?我正在使用 TextMate 和 Espresso。我不是在 HTML 文件中搜索,这个 HTML 是我的 Drupal 帖子的一小部分。我了解到我应该使用 HTML 解析器。我相信这个案例更简单。