Community
    • Login

    Replace all number to a new line

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 281 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.
    • app guideA
      app guide
      last edited by

      Hello… please help me friend.

      i have this data bellow :

      Microsoft Lync14.4.3
      Wunderlist3.4.25
      Artbox for Affinity1.1
      GlowPuzzle2.0
      Speech1.8.2
      Paste Queue (Multi Clipboard)1.3
      MPS2018.2
      Yandex.Disk3.0.3

      and i need to separate all the word and number like this :

      Peep
      2.3.4
      Microsoft Lync
      14.4.3
      Wunderlist
      3.4.25
      Artbox for Affinity
      1.1
      GlowPuzzle
      2.0
      Speech
      1.8.2
      Paste Queue (Multi Clipboard)
      1.3
      MPS
      2018.2
      Yandex.Disk
      3.0.3

      please help me for do this… thanks

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

        Hello, @app-guide and All,

        Easy with regexes !

        • Open the Replace dialog ( Ctrl + H)

          • Type in [\d.]+$ in the Find what: zone

          • Type in \r\n$0 in the Replace with: zone    OR    \n$0 if you works on an Unix file

          • Tick the Wrap around option

          • Select the Regular expression search mode

          • Click on the Replace All button

        Voila :-))

        Notes :

        • The [\d.] regex syntax searches for a single character which can be, either, a digit (\d) or a dot ( . )

        • Then, the [\d.]+ looks for a non-null range of characters, which can be, either, a digit or a dot

        • And the [\d.]+$ tries to match the greatest non-null range of digits / dots till the end ( $ ) of current line

        • In replacement, we first write the line-break characters ( \r\n or \n ), followed with the overall search match ( $0 )

        Best regards,

        guy038

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