Community
    • Login

    Remove columns

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 20.5k 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.
    • rovitieR Offline
      rovitie
      last edited by

      Good afternoon I have a file that has 1457619
      lines

      use the following to add the:
      Find what: ^\S+\h\K
      Replace with: :

      name :0b841fd6f983a161b43dab4f7a7930e98df9b4527f878dbd9 wwww/CEND 2d5f40d00067cf307dae3fbe64f 2016-04-27 01:41:50.228874 65.132225.45.254 Dalvik/2.1.0 (Linuxxx; U; Android 5.0; NXA8QC116 Build/LRX21V) f 1970-01-01 fc0d891c95512da905030f0rrrrrr45d57200acf1bf7f 7204165 false google 7196717 f

      but it doesn’t work with too many lines the regex:^\S+\h\K

      just add to the half of lines approximately

      Then
      para unir el name and :0b841fd6f983a161b43dab4f7a7930e98df9b4527f878dbd9
      use replace

      name:0b841fd6f983a161b43dab4f7a7930e98df9b4527f878dbd9 wwww/CEND 2d5f40d00067cf307dae3fbe64f 2016-04-27 01:41:50.228874 65.132225.45.254 Dalvik/2.1.0 (Linuxxx; U; Android 5.0; NXA8QC116 Build/LRX21V) f 1970-01-01 fc0d891c95512da905030f0rrrrrr45d57200acf1bf7f 7204165 false google 7196717 f

      and finally to be left alone with

      name:0b841fd6f983a161b43dab4f7a7930e98df9b4527f878dbd9

      I have used

      SEARCH: (?-s)\h.+

      REPLACE: EMPTY

      can you help me I just need

      name:0b841fd6f983a161b43dab4f7a7930e98df9b4527f878dbd9

      sorry if I haven’t been able to explain better

      thanks

      1 Reply Last reply Reply Quote 0
      • guy038G Offline
        guy038
        last edited by

        Hello @rovitie and All

        • Open the Replace dialog ( Ctrl + H )

        • Type in the regex \x20(?=:)|(?-s)\x20.+ in the Find what zone

        • Leave the Replace with zone EMPTY

        • Tick the Wrap around option

        • Select the Regular expression search mode

        • Left-click on the Replace All button

        voila ;-))

        Notes :

        • This regex contains two alternatives, separated with the alternation symbol |

          • The \x20(?=:) part looks for a space character ONLY IF  followed with a colon symbol, so catches the space char after the string name

          • Then, the (?-s)\x20.+ part searches for a space character ( \x20 ) , followed with all the remaining chars of current line ( .+ ). Note that the (?-s) syntax forces the regex dot symbol ( .) to represents a single standard character only ( not line-breaks chars as \r or \n )

          • As the replacement zone is EMPTY, anything matched by the search regex is then deleted

        Best Regards

        guy038

        TheNainBoyT 1 Reply Last reply Reply Quote 3
        • Makwana PrahladM Offline
          Makwana Prahlad Banned
          last edited by

          Hello,@rovitie

          Please try this information,To remove column

          Use Alt+Shift+navigation keys, or Alt+Shift+click to do a block select of just that column. Then simply press Delete.

          I hope this information will be useful for you.
          Thank You.

          1 Reply Last reply Reply Quote 0
          • TheNainBoyT Offline
            TheNainBoy @guy038
            last edited by

            @guy038 you saved my life men , hats off u buddy…

            1 Reply Last reply Reply Quote 0

            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