0

I have an XML file saved in Notepad++ and I want to delete multi-line comments (from <!-- through -->).  How can I do this globally (without going line by line)?  For example,

<Text>
<Text1>Hello</Text1>
<Text>
<!--<Text1>Hello</Text1> commented section
<Text> commented section
<Text1>Hello</Text1>--> commented section
<Text>
<Text1>Hello</Text1>
John
  • 1

2 Answers2

0

According to this answer notepad++ doesn't have this functionality with XML. Possibly use another editor that does, just to perform that function.

I'd suggest vim with the tcomment plugin, but I presume you're unfamiliar with vim so that may be tricky to use. VSCode may be more intuitive for you.

0

Use replace with this regular expression:

<!--.+-->

and an empty replacement value. Check ". matches newline"

Maxence
  • 171