Deleting a line having // at beginging

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
gout_text
Posts: 3
Joined: Mon Feb 14, 2011 7:50 am

Deleting a line having // at beginging

Post 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.
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Select Regular expression.
User avatar
SteveH
Posts: 327
Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:

Post 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.
Running TextPad 5.4 on Windows XP SP3 and on OS X 10.7 under VMWare or Crossover.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post 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 ...
gout_text
Posts: 3
Joined: Mon Feb 14, 2011 7:50 am

Post by gout_text »

Yes, this is giving me the desired results.
Thanks Steve, MudGuard and joseph for helping me in getting this.
Post Reply