Community
    • Login

    Replace In Files not working for me using Extended Mode

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 1 Posters 1.1k Views 1 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.
    • Dan EdwardsD Offline
      Dan Edwards
      last edited by Dan Edwards

      I am trying to replace a given line of text in many files with two lines of text

      e.g. replace

      #include “folder\somefile.h”;

      with

      #include “folder\somefile.h”;
      #include “folder\otherfile.h”;

      If I use extended mode it will find all occurrences just fine looking for

      #include “folder\\somefile.h”;

      But when I try to perform the Replace In Files action using this for the replace with

      #include “folder\\somefile.h”;\n#include “folder\\otherfile.h”;

      It fails just ends up doing nothing with

      Replace in Files: 0 occurrences were replaced.

      1 Reply Last reply Reply Quote 0
      • Dan EdwardsD Offline
        Dan Edwards
        last edited by

        Turns out that this was because the files were read-only. I was counting on the Perforce Plugin to automatically check them out but I guess that is not going to work. I will have to manually checkout everything and then perform the replacement.

        1 Reply Last reply Reply Quote 1

        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