Inserting new lines for entier text file

General questions about using TextPad

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

Post Reply
ksk051182
Posts: 1
Joined: Thu Aug 14, 2003 5:08 pm

Inserting new lines for entier text file

Post by ksk051182 »

8) Hello everyone,
Can anyone help me with this?
I want to add new lines for entire text file.

Example:

Hello Bob,
How are you doing?
I'm doing good.

After inserting new lines

Hello Bob,

How are you doing?

I'm doing good.


I have used

Find what: \n
Replace with: \n\n

and don't work......
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

//
Last edited by webmasta on Sat Aug 16, 2003 6:09 am, edited 1 time in total.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Hello ksk051182............

You asked:
I want to add new lines for entire text file.

Example:

Hello Bob,
How are you doing?
I'm doing good.

After inserting new lines

Hello Bob,

How are you doing?

I'm doing good.
:idea: Try this:

Search:\(^.+\)

Replace:\1\n

===========================
Explanation of RegEx Search String:
\( = start of first tagged expression
^ = start from beginning of line.
. = any character, digit, space, etc.
+ = one or more of the previous characters
\) = end of first tagged expression

==========================
Explanation of RegEx Replace String:
\1 = first tagged expression
\n = Line break

===========================
Common English translation: Find any line that is not blank (has one or more characters), and follow it with an additional line break.


Hope this helps.................good luck,
Bob
Post Reply