Remove specific lines fron nfo's
Hi, new here. I’ve searched the forum, but can’t see an answer (although I may have used wrong search words).
I have a lot of nfo files, with studios in them (example: <studio>ABC</studio>).
Can i tell notepad, to scan only nfo’s (have other files I do not want touched), and remove any lines that start with <studio>
Many thanks for any help you can give me
I imagine you can just do a Replace in Files and specify a Filter of
*.nfo. It doesn’t seem rocket science. :-)
Change your Search mode to Regular expression and set your Find what box to
(?-s)^<studio>.*\Rand set the Replace with box to be empty.
Thanks. Think I had filter set wrong.
I’ll give it a try
That didn’t work.
I am seeing a progress bar going through all the nfo’s, but it is not removing the lines
Not pretending to understand how this works, but is it possible that the ‘Find What’ field is searching the name of the nfo, rather than inside the nfo?
Screenshot of notepad:
Screenshot of one of the nfo files after scan is complete:
Not pretending to understand how this works,
Your example shows the string
<studio>is indented, but your search string needs it hard against the left margin.
I’d suggest adding
\h+just after the
^. This means one or more horizontal spaces.
Many thanks to both of you, working great
Just remember that the space character might e overlooked but with a regular expression ALL characters are equally as important.
As a suggestion you can get Notepad++ to display these and CR and LF characters. That way you will be more cognicient of them.
remove any lines that start with <studio>
I’ll just point out that your original problem statement said the above.
The solution I provided considered that.
But your real data didn’t have that condition.
So that’s why my solution didn’t work initially.