Add blank space if line does not exist?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

viacin
Posts: 1
Joined: Mon Jun 13, 2011 10:28 am

Add blank space if line does not exist?

Postby viacin » Mon Jun 13, 2011 10:36 am

Hello Everyone. Let me explain what I'm trying to do, I hope you can help.

I am formatting txt files, most of my files have keywords, like so:

Keywords:
real estate, debt consolidation, bad credit, home ownership, buy home, buy house, rent

I am removing the "Keywords:" line entirely and just keeping the keywords themselves. My problem is some of my files have no keywords and I need a blank line inserted where the keywords would go. How could I do this? I've tried everything I could think of.

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

Re: Add blank space if line does not exist?

Postby DataMystic Support » Tue Jun 14, 2011 4:45 pm

Why don't you do a search replace for

Code: Select all

Keywords:\r\n


and replace with

Code: Select all

\r\n


ie keep the line - remove the 'keywords:' heading?
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 1 guest