Page 1 of 1

Terminate end os lines...

Posted: Tue Nov 11, 2003 11:26 pm
by buzzt
How would I have Textpad automatically add a semi-colon at the end of each line? Is there a tool or Macro already out there?

Posted: Tue Nov 11, 2003 11:30 pm
by s_reynisson
Using POSIX Regular Expression:
Find: \n
Replace: ;\n
Hit "Replace All" HTH

Edit: If you want to go without newline:
Find (.)$
Replace \1;

Thanks.

Posted: Wed Nov 12, 2003 12:03 am
by buzzt
You da man! Works perfectly.

Posted: Wed Nov 12, 2003 3:43 am
by talleyrand
Not to be difficult, but wouldn't
Find: $
Replace: ;
Regular Expressions is checked and a Replace All work as well? It seemed to do fine for me, it's my only reason for asking

Posted: Wed Nov 12, 2003 4:07 am
by s_reynisson
The $ being an anchor I did not even consider this, but it sure works.
Just does not look right to me that it does, no real replacement taking place ;)