Notepad++ v4.2.2. regular expressions to match and

2019-02-25 00:11发布

I have a large file with a lot of <h1></h1> tags with various text between it. I'm searching for a way to remove all text between those tags, which might also include newline chars.

Any help would be appreciated.

Update: Tried this, but doesn't work... (ofcourse cursor was at begin of file)

enter image description here

2条回答
看我几分像从前
2楼-- · 2019-02-25 00:22

Select . matches new line and regular expression option

Find what:<h1>.*?</h1>

Replace with:<h1></h1>

查看更多
贪生不怕死
3楼-- · 2019-02-25 00:39

find:

<h1>.*?</h1>

replace with:

<h1></h1>
查看更多
登录 后发表回答