Page 1 of 1

just insert text without replacement

Posted: Thu Feb 12, 2015 8:41 am
by sonic406
Hello
I was just wandering if its possible to insert a line at the Beginning and the End of the file without replacing it with other lines?

Thank you in advance for any help in this matter.

Re: just insert text without replacement

Posted: Tue Feb 24, 2015 10:51 am
by DigitalVolcano
You can use the regular expressions ^ and $ to insert at the the beginning or end of a file. Make sure Multi-line anchors is turned off.

So to insert a line at the start of a file:

RegEx:
^
Replace:
This is a new line\r\n

Try it in the RegEx tester.

Re: just insert text without replacement

Posted: Thu Mar 19, 2015 9:50 am
by sonic406
thank you so much