Community
    • Login

    remove part of line

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 3 Posters 415 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.
    • cisco779kC
      cisco779k
      last edited by

      i have

      "trim:track:47EiUVwUp4C9fGccaPuUCS","text001",
      "trim:track:59qrUpoplZxbIZxk6X0Bm3","text002",
      "trim:track:70rFIfYN7lU6iTgUIVP42w","text003",
      

      and i want delete first part of each line “trim…”,

      "text001",
      "text002",
      "text003",
      

      how to?

      1 Reply Last reply Reply Quote 0
      • cisco779kC
        cisco779k
        last edited by cisco779k

        or better, how to remove part of txt with recursive text but different value? example:

        "trim:track:47EiUVwUp4C9fGccaPuUCS"
        "trim:track:59qrUpoplZxbIZxk6X0Bm3"
        "trim:track:70rFIfYN7lU6iTgUIVP42w"
        

        this is in case, unlike the previous post, the text to be deleted is not at the beginning of the line, but after other text, always on the same line, example:

        "some text","adc:artist:1bqxdqvUtPWZri43cKHac8, ddd:artist:41X1TR6hrK8Q2ZCpp2EqCz","text2","trim:track:70rFIfYN7lU6iTgUIVP42w",
        
        astrosofistaA 1 Reply Last reply Reply Quote 0
        • astrosofistaA
          astrosofista @cisco779k
          last edited by

          Hi @cisco779k

          This regex may work in the examples you provided:

          Search: (?-s)"trim:.+?",
          Replace: [Leave empty]
          

          Please don’t forget to take a look to the regex FAQ I suggested you before. Thank you

          Have fun!

          1 Reply Last reply Reply Quote 2
          • cisco779kC
            cisco779k
            last edited by

            many tanxs for your reply!

            Alan KilbornA 1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @cisco779k
              last edited by

              @cisco779k

              You have asked several regex data transformation questions on the forum. Give us all some “tanxs” by putting in the effort to learn why @astrosofista 's technique worked on your data, so that in the future you can maybe solve this type of problem (a fairly simple one) without coming here for help.

              Some nice resources are found HERE.

              1 Reply Last reply Reply Quote 2
              • Terry RT Terry R referenced this topic on
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors