Community
    • Login

    Replace all number to a new line

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 583 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 Offline
      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 Offline
        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

        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