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)?
-
yes, I assume so. Use find dialog and tick regular expression.
Find what:^N\d+\hand 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
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