Line Break after text bock insert? Possible? w/Pictures!

General questions about using TextPad

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

Post Reply
stevef22
Posts: 10
Joined: Mon Oct 10, 2005 8:14 pm

Line Break after text bock insert? Possible? w/Pictures!

Post by stevef22 »

Hello all, great to be at this forum! All the knowledge here is excellent. I have been reading all the posts I can.
Here is my problem...

Any way to help speed up this process. I would like to bock-select a white area and tell Text Pad to insert a line return after each line.

Like this....

Image

Thank you guys for all your help on this one. [/img]
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

First, posting your data as a pix does not help, no test data for us to play with but I'm guessing you missed the "Code" tag for your post... ;)
There are so many ways to do this in TP, here is just one:
1. Select the lines you want to insert the linebreaks in.
2. Using regular expressions and assuming each line contains the string "Store" only once enter
Find: Store
Replace: \nStore
3. Tick "Selected Text" and hit Replace All.
I have used POSIX regular expression syntax, which can be selected from the Editor page of the Preferences dialog box. HTH
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
SteveH
Posts: 327
Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:

Post by SteveH »

I can't answer your specific question about the search and replace using block mode. The replace you show is pretty straightforward using regular expression.

The main thing is to replace Store with \r&, where \r represents a line break before the original search expression (&).

I have to confess I don't currently have access to a copy of TextPad so the replacement expression is from BBEdit on the Mac. It might be worth checking the equivalent in the TextPad help file. From memory I think the r may need to be n.
stevef22
Posts: 10
Joined: Mon Oct 10, 2005 8:14 pm

Post by stevef22 »

Hrm, Didnt seem to work. Your using really big confusing words for me. Can you please dumb the process down a little bit? Here is my data in Code format so you can play around w/ it.

Code: Select all

201		

Darrell Burrell		   Store 0079	   	August 2005 
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Darrell Burrell		   Store 0079	   	August 2005
Here are the pictures of what I did so you can correct me...

Image
Image
stevef22
Posts: 10
Joined: Mon Oct 10, 2005 8:14 pm

Post by stevef22 »

It didnt line break, It just put the expression in my text.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

You're ok, just tick the "Regular expression" box and don't use block select mode, just select the entire lines you want to work on.
Then I open up and see
the person fumbling here is me
a different way to be
stevef22
Posts: 10
Joined: Mon Oct 10, 2005 8:14 pm

Post by stevef22 »

Worked! thx guys your the best!
Post Reply