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



  • 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)?



  • @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


Log in to reply