Community
    • Login

    Remove line numbers from every line in a G-code program

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 4.7k 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.
    • Gary ChristopherG
      Gary Christopher
      last edited by

      I want to remove the line numbers that appear at the beginning of each program line in several programs of up to 100000 lines (sometimes more). Each line number starts with “N” and ends with a number. For example, line one is N100, line two is N110, etc., on up to Nxxxxxx. Each line number is followed by a space before the code to be executed.

      Is there a way to do a global search and remove for any text that starts with N and ends with a space (and not touch the remaining text on the same line)?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Gary Christopher
        last edited by Claudia Frank

        @Gary-Christopher

        yes, I assume so. Use find dialog and tick regular expression.

        Find what:^N\d+\h
        

        and leave replace with empty.

        ^ means start of line
        N is literal
        \d means digits
        + means match the preceding atom one or more times
        \h means horizontal spaces ( you could also use a space by pressing the spacebar.)

        Cheers
        Claudia

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