Answer the question
In order to leave comments, you need to log in
How in Notepad++ to execute a regular expression only the first time for all open files?
There are many HTML files, you only need to replace the first one <h2>
with \t<h2>
, there are more than one in each file <h2>
, but only the first one needs to be replaced.
Answer the question
In order to leave comments, you need to log in
Notepad++, as far as I know, cannot use such functions.
Of the options, you can only see what unique symbols are nearby only for this place in the document, but common to all documents.
For example, this first tag may be preceded by some other one (let's say closing </head>
), or something unique after it, but, of course, after or before the rest of the tags in the document, there should be nothing of the kind. Then it will be possible to replace not even with a regular expression, but with the usual advanced search (with support for the characters "\n", "\t", etc.).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question