G28 ; home all axes M117 Purge extruder G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position G1 X2 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
You need to omit the javascript marker / and /g in your expression. Also you should start with ^ if it matches from line start to improve comparison speed.
Set replacement to: M118 Replaced M220 So I can better see if it was executed. Then executing your demo code above and as you see in output it got replaced:
So not sure what you are doing wrong. I assume you have no trailing space and are using latest 1.2.0 release. If you want to replace all M220 S100 you can omit the ; .... part. Just in case comment got stripped, but it doe snot get stripped in my version so at that stage it is still there.
I did not realize it because the speed is not updated in the interface.
But yesterday I put the same file to print on two different machines and one finished before the other.
So it works ...
I don't know if it was when I removed the part of the comment or something else.
But it works.
Comments
Only thing is in replacements no further replacements may occur. Otherwise endless recursion would be possible.
M140 S60
M105
M190 S60
M104 S195
M105
M109 S195
M82 ;absolute extrusion mode
M201 X500.00 Y500.00 Z1000.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z12.00 E120.00 ;Setup machine max feedrate
M204 P1250.00 R2250.00 T1250.00 ;Setup Print/Retract/Travel acceleration
M205 X10.00 Y10.00 Z0.40 E2.50 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ; home all axes
M117 Purge extruder
G92 E0 ; reset extruder
G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position
G1 X2 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
So I can better see if it was executed. Then executing your demo code above and as you see in output it got replaced:
So not sure what you are doing wrong. I assume you have no trailing space and are using latest 1.2.0 release.
If you want to replace all M220 S100 you can omit the ; .... part. Just in case comment got stripped, but it doe snot get stripped in my version so at that stage it is still there.