简体   繁体   English

Notepad ++搜索和替换

[英]Notepad++ search & replace

I'm trying to convert a html file with 100 of entries like this one: 我正在尝试将具有100个条目的html文件转换为如下所示:

<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." 其中的数字为“ 1”。 goes from 1 to 100, into this: 从1到100,变为:

<li>
   TEXT DESCRIPTION
</li>

I haven't find a way to do this, neither with regexp nor with extended search mode. 我没有找到一种方法,无论是使用regexp还是使用扩展搜索模式。 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? 有人知道吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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