Make Paragraphs

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

pakiyabhai
Posts: 8
Joined: Tue Feb 09, 2010 7:26 pm

Make Paragraphs

Postby pakiyabhai » Mon Mar 22, 2010 3:58 pm

I have used textsoap on mac , with a feature which gives the option of make paragraph from the text below , there are extra spaces as you can see from the body of the text. I cannot find anything like this in Remove menu .






South African White Corn Falls as Rand Gains Against Dollar



By Mkhululi Mancotywa
March 15 (Bloomberg) -- White corn in South Africa, the
largest producer of the grain on the continent, fell as the rand
rose, cutting the cost of imports for local millers.
The rand traded at 7.3994 against the dollar at 9:25 a.m.
in Johannesburg, compared with 7.4015 at the close of trading at
noon March 12.

User avatar
AnthonyFitz
Posts: 11
Joined: Mon Aug 25, 2008 9:16 pm
Location: Dublin and Manila
Contact:

Re: Make Paragraphs

Postby AnthonyFitz » Mon Mar 22, 2010 10:12 pm

Hi pakiyabhai,

I think this is something that could be done in TextPipe.

What do you want to do exactly? Can you post the output of the text you would like to see.

Anthony.
http://www.TheLocalizer.com/
High Quality, Low Cost, Localization Engineering, Testing, Audio & Video Services

pakiyabhai
Posts: 8
Joined: Tue Feb 09, 2010 7:26 pm

Re: Make Paragraphs

Postby pakiyabhai » Mon Mar 22, 2010 10:32 pm

From

Code: Select all

 
South African White Corn Falls as Rand Gains Against Dollar



By Mkhululi Mancotywa
March 15 (Bloomberg) -- White corn in South Africa, the
largest producer of the grain on the continent, fell as the rand
rose, cutting the cost of imports for local millers.
The rand traded at 7.3994 against the dollar at 9:25 a.m.
in Johannesburg, compared with 7.4015 at the close of trading at
noon March 12.


To


Code: Select all

South African White Corn Falls as Rand Gains Against Dollar By Mkhululi Mancotywa March 15 (Bloomberg) -- White corn in South Africa, the largest producer of the grain on the continent, fell as the rand rose, cutting the cost of imports for local millers. The rand traded at 7.3994 against the dollar at 9:25 a.m.in Johannesburg, compared with 7.4015 at the close of trading at noon March 12.

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Make Paragraphs

Postby DataMystic Support » Tue Mar 23, 2010 9:11 am

Use an EasyPattern like this, to replace runs of spaces tabs and line breaks with a single space.

Code: Select all

[ longest 1+ (space or tab or cr or lf) ]

ie

Code: Select all

EasyPattern [[ longest 1+ (space or tab or cr or lf) ]] with [ ]
   [ ] Match case
   [ ] Whole words only
   [ ] Case sensitive replace
   [X] Prompt on replace
   [ ] Skip prompt if identical
   [ ] First only
   [ ] Extract matches
   Maximum text buffer size 4096
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

pakiyabhai
Posts: 8
Joined: Tue Feb 09, 2010 7:26 pm

Re: Make Paragraphs

Postby pakiyabhai » Tue Mar 23, 2010 3:58 pm

hanks for the reply , you were close but something did go wrong , the output comes with no space at all now , something like . I did precisely what you asked me to used a replace filter with easy pattern.

Code: Select all

SouthAfricanWhiteCornFallsasRandGainsAgainstDollarByMkhululiMancotywaMarch15(Bloomberg)--WhitecorninSouthAfrica,thelargestproducerofthegrainonthecontinent,fellastherandrose,cuttingthecostofimportsforlocalmillers.Therandtradedat7.3994againstthedollarat9:25a.m.inJohannesburg,comparedwith7.4015atthecloseoftradingatnoonMarch12.


Update , in replace column i entered one single space and it worked.

Can you tell me whta does cr or lf mean & what would the perl equivalent of this command be ?

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Make Paragraphs

Postby DataMystic Support » Tue Mar 23, 2010 4:25 pm

Glad you realized you had missed the space in the replacement!

CR is a carriage return. LF is a line feed. TextPipe hides these details for you - you don't need to know the technical details at all when you use EasyPatterns in TextPipe.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Raresed84
Posts: 1
Joined: Thu Feb 25, 2010 9:28 pm
Location: Romania
Contact:

Re: Make Paragraphs

Postby Raresed84 » Mon Mar 29, 2010 5:10 pm

thanks for this post...it was time to fix this problem:)

pakiyabhai
Posts: 8
Joined: Tue Feb 09, 2010 7:26 pm

Re: Make Paragraphs

Postby pakiyabhai » Mon Apr 26, 2010 5:02 pm

there is a small error which I am facing with this now .

This seems to remove ALL the spaces between the paragraphs as well and my news becomes one long string.

Can I modify this to respects paragraphs or maybe 2 spaces ?

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Make Paragraphs

Postby DataMystic Support » Tue Apr 27, 2010 9:26 am

PLease attach the filter as a zip file, with sample text in the Trial Run area.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 8 guests