Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Easley, South Carolina, USA
    Thanked 0 Times in 0 Posts

    I have a large file that was created with an unkown OCR program.

    All lines are terminated with a Hard Carriage Return. Some are terminated with a word split with a hyphen and a Hard Carriage Return.

    How can I remove all the Hard Carriage Returns and the Hard Carriage Returns preceeded with a hyphen.

    I suspect this can be done with a Global Find and Replace, but I don't know what to enter for the Hard Carriage Return.

    Any information would be greatly appreciated.

    Thomas Cox

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Dec 2000
    New York, NY
    Thanked 28 Times in 27 Posts

    You can search for hard carriage returns aka paragraph marks using: ^p


  4. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by thomascox46 View Post
    How can I remove all the Hard Carriage Returns and the Hard Carriage Returns preceeded with a hyphen.
    Try a caret followed by a lower case p (^p). If you are using wildcards, this will not work, and you have to use ^13 instead. In some cases, e.g., text files from a Unix/Linux-based system, you have to use ^13 with or without wildcards.

    You can find more special characters on the Special pop-up when you expand the find dialog using the More button.

  5. #4
    4 Star Lounger
    Join Date
    Jan 2010
    Chichester, UK
    Thanked 10 Times in 9 Posts
    You can use Find and Replace to sort out the document. First you will need to find REAL end of paragraphs, which is where there should be two consecutive returns.

    So for the first F&R pass search for ^p^p and replace with ZXCV (or any unique code that doesn't appear in the document).
    On the second F&R pass, search for the remaing end of line ^p para marks and replace with either nothing or a space (if required)
    On the third F&R pass, search for ZXCV (or your unique code) and replace with ^p.

    Your document should now be formatted with normal full lines automatically wrapped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts