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.
Add blank space if line does not exist?
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Add blank space if line does not exist?
Why don't you do a search replace for
and replace with
ie keep the line - remove the 'keywords:' heading?
Code: Select all
Keywords:\r\n
Code: Select all
\r\n