• Login
Community
  • Login

[SOLVED] Extract the last number of each line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 482 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.
  • M
    mike69290
    last edited by mike69290 Mar 5, 2024, 2:28 PM Mar 5, 2024, 1:53 PM

    Hello

    On my whole txt I need to copy the last numbers of each line.

    I am able to mark them using [0-9]+$ but what to do then?

    The best would be to copy the marking. Can’t find :(
    Or inverse marking, delete marking then copy all.
    Or replace by nothing the inverse of [0-9]+$

    Sheet N°
    
    AZ14 In 57
    AZ12 Elt 153
    BS08 Elt 06
    BS08 Elt 230
    AZ10 OUT 32
    AZ22 OUT 324
    

    Thanks

    P 1 Reply Last reply Mar 5, 2024, 2:06 PM Reply Quote 0
    • P
      PeterJones @mike69290
      last edited by Mar 5, 2024, 2:06 PM

      @mike69290 said in Extract the last number of each line:

      The best would be to copy the marking.

      Use Search > Mark instead of Search > Find (or switch to the Mark tab if the Find/Replace/Mark dialog is already open). Use the Regex you showed. Use Mark All then Copy Marked Text. This will copy all the matching text to the clipboard.

      M 1 Reply Last reply Mar 5, 2024, 2:22 PM Reply Quote 2
      • M
        mike69290 @PeterJones
        last edited by Mar 5, 2024, 2:22 PM

        @PeterJones said in Extract the last number of each line:

        Copy Marked Text would be the dream solution but as I have written, I can’t find it.

        1 Reply Last reply Reply Quote 0
        • M
          mike69290
          last edited by mike69290 Mar 5, 2024, 2:30 PM Mar 5, 2024, 2:27 PM

          Omg found it! I was looking in the menus and searching over the internet a wrong keyword “copy marking”.

          Moreover the button is not translated in my langage.

          I am sorry for the stupid topic. Thanks

          P 1 Reply Last reply Mar 5, 2024, 2:41 PM Reply Quote 1
          • P
            PeterJones @mike69290
            last edited by Mar 5, 2024, 2:41 PM

            @mike69290 said in [SOLVED] Extract the last number of each line:

            Omg found it! I was looking in the menus.

            It’s also in the menus: Search > Copy Styled Text > Find Mark Style

            Moreover the button is not translated in my language.

            You might want to check to see if you’ve just got an outdated translation file. Often, config files don’t get overwritten when you do an update. I recommend that you try downloading the most recent zipped edition, and grab the most recent copy of your localization file from there.

            But when I searched the localization files for v8.6.4 portable, it appears that only 39 of the 92 localization files have <Item id="1725"… so yes, there is a good chance that string (and many others) haven’t made it into your specific localization. Notepad++ relies on volunteers to submit translations, and some of the translations aren’t as active as others. (While the author of Notepad++ knows at least 3 languages fluently (as far as I can tell), I’m sure he doesn’t know all 92 of the localization languages , so cannot keep them up to date without outside help).

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