Page 1 of 1

Deleting a line having // at beginging

Posted: Mon Feb 14, 2011 7:58 am
by gout_text
I am a new member and trying to use text pad as my editor.
I want to delete all lines which has // .
I tried some thing like
Find.*//.*
Replace "blank space"
but no luck :( .
Could you help in getting this?
Thanks in advance.

Posted: Mon Feb 14, 2011 9:00 am
by ben_josephs
Select Regular expression.

Posted: Mon Feb 14, 2011 12:42 pm
by SteveH
If you only want to clear lines beginning with // use the following.

Code: Select all

^//.*
with regular expression enabled. The '^' symbol matches the start of a line.

Your original search string answers the question on how to "delete all lines which has //". The one above is for "Deleting a line having // at beginning".

Hope this helps.

Posted: Mon Feb 14, 2011 6:41 pm
by MudGuard
Searching for

Code: Select all

^//.*
and replacing by nothing does not delete the lines - for that it must be

Code: Select all

^//.*\n
Otherwise the line end will survive ...

Posted: Tue Feb 15, 2011 5:00 am
by gout_text
Yes, this is giving me the desired results.
Thanks Steve, MudGuard and joseph for helping me in getting this.