Community
    • Login

    Remove columns

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 17.8k 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
      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
        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
          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
            TheNainBoy @guy038
            last edited by

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

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