Community
    • Login

    Find and Replace Multiple Lines of Code for whole directory

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 496 Views
    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.
    • Karan MandyaK
      Karan Mandya
      last edited by

      I’m currently working on an assignment and I need to replace multiple lines of code for the whole directory.
      For example, I have a code as:

      <link rel="apple-touch-icon" sizes="180x180" href="">
      <link rel="icon" type="image/png" sizes="32x32" href="">
      <link rel="icon" type="image/png" sizes="16x16" href="">
      <link rel="manifest" href="manifest.json">
      

      Now, I want to replace this code with blank. But I’m not able to do this in “Find in Files” menu as it only finds one line of code at a time and not multiple lines.

      There are thousands of files that needs to be replaced. I tried a plugin but they dont have such feature to replace multiple line in directory (only allows current file).

      Would really appreciate your help in this regard.

      1 Reply Last reply Reply Quote 0
      • Karan MandyaK
        Karan Mandya
        last edited by

        I was able to make it work.

        Using \r \n and \t in extended search mode I was able to put entire code supposed to be replaced in single line and then did a replace in all files pretty easily. Yay!

        JigenJ 1 Reply Last reply Reply Quote 2
        • JigenJ
          Jigen @Karan Mandya
          last edited by

          @Karan-Mandya said in Find and Replace Multiple Lines of Code for whole directory:

          I was able to make it work.

          Using \r \n and \t in extended search mode I was able to put entire code supposed to be replaced in single line and then did a replace in all files pretty easily. Yay!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors