Add blank rows between paragraphs on a bunch of txt files

Completed Posted 7 years ago Paid on delivery
Completed Paid on delivery

Hello,

We're looking for an expert in regular expressions to help us. We have ~11.000 txt files. In each txt file, there are articles to publish. We're using Notepad++ and we need someone to provide us the right formulas to fix some formatting issues before we can publish these posts. The main issue is we must add blank rows between each paragraph when they're missing.

To achieve that, we'll use Notepad++ and run a global "search and replace" in the whole folder where these ~11.000 files are located.

There are some specific situations to fix:

1/ Sometimes, there's already a blank row between some paragraphs and in this case, we mustn't add another one, as we must have only 1 blank row between each paragraph.

2/ Sometimes, <br /><br/> have been added, sometimes it's written <br />. We know how to remove them globally, we just have to replace <br/>, <br /> and <br/><br/> by nothing.

3/ Blank rows at the very end of each article must be removed.

4/ If we have 2 consecutive blank rows (or more), we must keep only 1.

I've attached 5 documents. One shows exactly the problem and what we want. The other documents (txt files) are examples of these txt files, so you can test and see if you found the formulas.

Before applying to this job, inspect the txt doc, find the formula and if this formula is working, then you can apply cause you have the solution.

Thanks a lot for your understanding.

Best regards,

Catherine.

Regular Expressions

Project ID: #11181204

About the project

2 proposals Remote project Active 7 years ago

Awarded to:

MimiFL

Hi, i m serious freelancer with 100% completion rate and i believe i can help you. If you are interested pm me and i will send you the 2 regexes that i m using for doing exactly the same thing. First regex will remove More

$20 USD in 0 days
(2 Reviews)
1.4

2 freelancers are bidding on average $25 for this job

wee493

I can start right now and deliver quickly. Please let me know if you have any questions. Thanks, Josh O.

$30 USD in 1 day
(0 Reviews)
0.0