How to hide lines that don't match?

  • Hello. I like in the title. I want to hide (not delete) lines.
    In text file I have lines with “<RawDialog>RANDOM VALUE</RawDialog>” and I want too hide everything that don’t have it. I don’t want to delete other lines only hide them because I want to change values of each line with this command and save file with keeping other lines untouched. File have about 250k lines so searching matching line then replacing value and again takes some time. It is any way to hide these lines?
    Don’t answer with something like “Use “Find and replace”” becasue each line have other values.
    Thanks in advance.

  • I don’t quite understand how you plan to modify the <RawDialog> lines without using search and replace (or at least using search inside some macro). Can you clarify?

    It appears you might assume that if the lines are hidden, then search/replace will not affect them. I did a quick experiment, and that doesn’t seem to be the case since my hidden lines were modified by a Replace operation.

    Perhaps using a tool like sed, AWK, PERL, or Python would be a better way to proceed.

Log in to reply