Community
    • Login

    How to hide lines that don't match?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    hide lines
    2 Posts 2 Posters 2.6k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Robert ŁachR Offline
      Robert Łach
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ Offline
        Jim Dailey
        last edited by

        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.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors