Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Replacing carriage returns with space

Tagged: ,

Return to Member Forum

  • Author
    Posts
    • #65279
      kartik manoj
      Member

      Hello Everyone,
      I have somewhat sticky situation. I have a text file with a lot of paragraphs in it. The problem is, the text file is formatted in such a way that, for line breaks, a carriage return is used and for paragraph breaks a double carriage return is used. I converted the double carriage return to single but my predicament starts here. I want to convert the carriage returns used for line breaks to spaces but leave the carriage returns used to separate the paragraphs. Is there any way to achieve the formatting I want?
      Example of content I am talking about can be found at gutenberg.org text file books.

    • #65280
      Gert Verrept
      Member

      I would first change the double returns into a “dummy” char (one which isn’t used in the text).
      Then, change all the returns with spaces.
      Third, replace the “dummy” again with the double carriage returns.
      This should do the trick more or less.

    • #65281
      kartik manoj
      Member

      @gret Thanks for helping. It is definitely possible. Could you please tell me the grep code for this find and replace?

    • #65282
      kartik manoj
      Member

      @Gret I’d used another method to solve the problem. While placing the text file, I checked the show import options check box and then a dialog box opened which had the option of replacing the carriage returns at the end of the line to spaces while leaving the paragraph returns. Thanks for the help.

Viewing 3 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads