Posted by: Tempy111 | Date: 2022-06-08 12:12 | IP: IP Logged
Hi.. this is probebly gonna be a bit.. of a no-go but..
Doing some basic scripting and there can be such a need when doing some converting and stuff to add tons of new lines ON certain condictions.. .. I'll just go with an example:
If line has "G0" in it, then need to add a new line BELOW that line which has a new command. Problem is, G0 would be at the start of a line with variable stuff after it so a simple find and replace won't work.. it's also often the case of hundreds of such lines which all need the new bit.. and each one will probebly have bits of the top different but all have the G0 in common.
Is it possible to do like a wildcard find and replace which IF "G0 *(random)" then add "LineBreak new line here" without replacing the found G0 line?
sorry if this doesn't make too much sense..
Posted by: pspad | Date: 2022-06-08 13:08 | IP: IP Logged
This is possible using regular expressions with search/replace
Stay on the bottom of file
[x] Regular expressions