If **every** paragraph ends with a period, you could try to change
only those not of that form, something like

find: ([^\.])\n

replace: \1

or perhaps adding a space at the end of the replacing string.

You might want to consider first hyphenated words (if any): lines
ending with a hyphen just before newline.

Best,

Nestor


On Mon, Oct 9, 2017 at 10:56 AM, Mark C. <[email protected]> wrote:
> So I'm cleaning up a text file that was converted from a PDF file. One of
> the problems is that each line break is a hard return.
>
> I'd like to replace those hard returns.
>
> However, at the end of each paragraph, there is also a hard return, so
> replacing the hard returns will remove all paragraph formatting.
>
> However, the last line in each paragraph is never longer than 35 characters.
>
> Is there a way within BBedit to search for [space] [hard return] [any
> sentence<35 characters [space] [hard return]  and remove that 2nd hard
> return?
>
> I'm guessing I'll have to learn Sed to accomplish this, but thought I would
> ask here first.  Thank you.
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to