开发者

Notepad++ search & replace

I'm trying to convert a html file with 100 of entries like this one:

<table>
<tr>
<td valign="top" width="30">
1.</td>
<td>
TEXT DESCRIPTION
</td>
</tr>
</table>
<table><tr><td></td></tr></table>

where the number "1." goes from 1 to 100, into this:

<li>
   TEXT DESCRIPTION
</li&开发者_JAVA技巧gt;

I haven't find a way to do this, neither with regexp nor with extended search mode. Any ideas?


You could start with this:

Replace

.*<td>(.*[A-Za-z]+.*)<\/td>.*

with

<li>\1</li>

This will match one chunk of code of the form you reported. You must modify it to match multiple chunks of the same form in the same file. Moreover to work correctly we should make it match lazily. Someone who knows how?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜