Notepad++ delete until colon for every line with replace all












9















I'm using Notepad++ Replace box to delete text to the left of the colon (:) in all 3 lines of my file:




TRACE: do



TRACE: re



TRACE: mi




I'm using ^[^:]+: in the 'Find what:' field and 'Replace with:' is empty but when it goes to the next line it automatically selects and deletes what was output in the previous line, so when I run Replace All it results in:




mi




It should show:




do



re



mi











share|improve this question







New contributor




teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    9















    I'm using Notepad++ Replace box to delete text to the left of the colon (:) in all 3 lines of my file:




    TRACE: do



    TRACE: re



    TRACE: mi




    I'm using ^[^:]+: in the 'Find what:' field and 'Replace with:' is empty but when it goes to the next line it automatically selects and deletes what was output in the previous line, so when I run Replace All it results in:




    mi




    It should show:




    do



    re



    mi











    share|improve this question







    New contributor




    teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      9












      9








      9








      I'm using Notepad++ Replace box to delete text to the left of the colon (:) in all 3 lines of my file:




      TRACE: do



      TRACE: re



      TRACE: mi




      I'm using ^[^:]+: in the 'Find what:' field and 'Replace with:' is empty but when it goes to the next line it automatically selects and deletes what was output in the previous line, so when I run Replace All it results in:




      mi




      It should show:




      do



      re



      mi











      share|improve this question







      New contributor




      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm using Notepad++ Replace box to delete text to the left of the colon (:) in all 3 lines of my file:




      TRACE: do



      TRACE: re



      TRACE: mi




      I'm using ^[^:]+: in the 'Find what:' field and 'Replace with:' is empty but when it goes to the next line it automatically selects and deletes what was output in the previous line, so when I run Replace All it results in:




      mi




      It should show:




      do



      re



      mi








      notepad++ regex






      share|improve this question







      New contributor




      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 hours ago









      teoweyteowey

      484




      484




      New contributor




      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      teowey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          9














          It's a "bug" ("feature") of Notepad++, you have to capture the rest of the line and use the value in replace:




          • Find what: ^[^:]+:(.+)$

          • Replace with: $1

          • check Wrap around

          • check Regular expression

          • UNCHECK . matches newline

          • Replace all


          Another way is:




          • Find what: ^[^:rn]+:

          • Replace with: LEAVE EMPTY






          share|improve this answer



















          • 1





            +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

            – Graham
            1 hour ago













          • Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

            – Graham
            1 hour ago














          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          teowey is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420401%2fnotepad-delete-until-colon-for-every-line-with-replace-all%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          9














          It's a "bug" ("feature") of Notepad++, you have to capture the rest of the line and use the value in replace:




          • Find what: ^[^:]+:(.+)$

          • Replace with: $1

          • check Wrap around

          • check Regular expression

          • UNCHECK . matches newline

          • Replace all


          Another way is:




          • Find what: ^[^:rn]+:

          • Replace with: LEAVE EMPTY






          share|improve this answer



















          • 1





            +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

            – Graham
            1 hour ago













          • Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

            – Graham
            1 hour ago


















          9














          It's a "bug" ("feature") of Notepad++, you have to capture the rest of the line and use the value in replace:




          • Find what: ^[^:]+:(.+)$

          • Replace with: $1

          • check Wrap around

          • check Regular expression

          • UNCHECK . matches newline

          • Replace all


          Another way is:




          • Find what: ^[^:rn]+:

          • Replace with: LEAVE EMPTY






          share|improve this answer



















          • 1





            +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

            – Graham
            1 hour ago













          • Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

            – Graham
            1 hour ago
















          9












          9








          9







          It's a "bug" ("feature") of Notepad++, you have to capture the rest of the line and use the value in replace:




          • Find what: ^[^:]+:(.+)$

          • Replace with: $1

          • check Wrap around

          • check Regular expression

          • UNCHECK . matches newline

          • Replace all


          Another way is:




          • Find what: ^[^:rn]+:

          • Replace with: LEAVE EMPTY






          share|improve this answer













          It's a "bug" ("feature") of Notepad++, you have to capture the rest of the line and use the value in replace:




          • Find what: ^[^:]+:(.+)$

          • Replace with: $1

          • check Wrap around

          • check Regular expression

          • UNCHECK . matches newline

          • Replace all


          Another way is:




          • Find what: ^[^:rn]+:

          • Replace with: LEAVE EMPTY







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 3 hours ago









          TotoToto

          4,175101226




          4,175101226








          • 1





            +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

            – Graham
            1 hour ago













          • Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

            – Graham
            1 hour ago
















          • 1





            +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

            – Graham
            1 hour ago













          • Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

            – Graham
            1 hour ago










          1




          1





          +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

          – Graham
          1 hour ago







          +1. Originally, I though NP++'s implementation was fine, but I tested this Python example, and found that NP++ is indeed irregular by retaining position after a lookbehind is evaluated. Learn something new every day! I lack time now, but I can probably file an issue in their GitHub repo later (there's no related issue currently open).

          – Graham
          1 hour ago















          Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

          – Graham
          1 hour ago







          Not to mention that it's misleading because it's inconsistent with other components of the find-and-replace tab, like what's shown to the user when previewing a change via the "Find" or "Mark". (Side note: I find "Mark" to be particularly useful when drafting regex to ensure I haven't made a silly mistake.) Really I'm starting to think I should switch text editors or start contributing my own bug fixes to Notepad++, since there are actually a surprising number of miscellaneous issues. But I guess that's probably the case for any dedicated program user like myself.

          – Graham
          1 hour ago












          teowey is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          teowey is a new contributor. Be nice, and check out our Code of Conduct.













          teowey is a new contributor. Be nice, and check out our Code of Conduct.












          teowey is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420401%2fnotepad-delete-until-colon-for-every-line-with-replace-all%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕