• Login
Community
  • Login

Delete everything after a value.

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 489 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.
  • R
    Raul A. Ocasio Gonzalez
    last edited by Raul A. Ocasio Gonzalez Feb 4, 2020, 7:26 PM Feb 4, 2020, 7:25 PM

    Hello everyone, I have found in another treat this code

    ((?s)((^.)“value”))(.$)

    Whis will choose the last word called “value” on a text and, if used replace with empty, delete everything before that in a file.

    Now, what i want is the complete opposite, I want to delete everything AFTER “value”

    Additionally if someone could tell me how to start with the first found value rather than the last found value that would be great, since the code I posted here always choose the last “value” found.

    Thanks in advance

    R 1 Reply Last reply Feb 5, 2020, 1:04 PM Reply Quote 0
    • R
      Raul A. Ocasio Gonzalez @Raul A. Ocasio Gonzalez
      last edited by Feb 5, 2020, 1:04 PM

      @Raul-A-Ocasio-Gonzalez

      I realized that Notepad++ has the option to reverse a search

      A 1 Reply Last reply Feb 5, 2020, 1:12 PM Reply Quote 0
      • E
        Ekopalypse
        last edited by Feb 5, 2020, 1:08 PM

        @Raul-A-Ocasio-Gonzalez
        means that you found your solution?
        I’m asking because I was going to respond to the original question.

        1 Reply Last reply Reply Quote 0
        • A
          Alan Kilborn @Raul A. Ocasio Gonzalez
          last edited by Feb 5, 2020, 1:12 PM

          @Raul-A-Ocasio-Gonzalez said in Delete everything after a value.:

          Notepad++ has the option to reverse a search

          What does that even mean?

          If I’m doing a regular expression search mode search, my Backward direction checkbox is disabled. Clearly earlier you were talking about a regex search. Hmmm.

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