I have a lot of text that has been copied from a PDF, that I need to make into text files for research purposes. When the text copied over, there was a hard line return at the end of every sentences, and a blank space between paragraphs. I need to the lines within the paragraph joined but the paragraphs to remain separate and am looking for a regex to do that:
*For example, the text looks like this:* *This is the 1st paragraph. * *With a few lines that* *need connected.* *This is another paragraph with* *a blank line between* *it and the previous paragraph.* *I want it to look like this:* *This is the 1st paragraph. With a few lines that need connected.* *This is another paragraph with a blank line between it and the previous paragraph.* *The best that I have been able to come up with is this:* ([^\r\n])\R(?=[^\r\n]) *But that will also remove the last character of each line, so I get this:* *This is the 1st paragraph With a few lines tha need connected.* *This is another paragraph wit a blank line betwee it and the previous paragraph.* Any suggestions about how to rewrite the above so that it does not remove the final character? Gavin -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/7d23bc98-d5b6-4739-94e8-c08f1efabb28n%40googlegroups.com.
