Hi Folks,
I'm trying to search for a line with a specific string and then insert a new line after.
Searching for a line containing G87* (the following characters change in each file)and insert M32 on the next line.
Examples:
G87P123
becomes
G87P123
M32
G870-45
becomes
G870-45
M32
looks like the wild card (*) doesn't work in the standard find/replace field.
Anybody got any ideas how to do this ?
Search and Insert
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: Search and Insert
You can use regular expressions - Standard replace doesn't support wildcards.
RegEx:
Replace:
Options:
Multi-line Anchors
Try it in the reg-ex tester. Remember to back up before replacing!
RegEx:
Code: Select all
(G87.*$)
Code: Select all
$1\r\nM32
Multi-line Anchors
Try it in the reg-ex tester. Remember to back up before replacing!