简体   繁体   中英

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>

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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