Basic Find/Change question

Learn / Forums / General InDesign Topics / Basic Find/Change question

Viewing 6 reply threads
  • Author
    Posts
    • #73654

      I’ve imported a directory file created by an idiot. The firm name, address, phone, email, contact, etc., were EACH entered as a record in the Excel file I was provided. When placing in InDesign, I end up with a huge list of lines with no distinguishing “handle” to grab for formatting (bold, space before, font, etc.).
      In an attempt to start somewhere, I’ve ended all lines with a soft return. I’m now attempting a find/change, the FIND being “soft return, any digit” (\n\d). How do I “let go” of the “any digit” to simply CHANGE to hard return (\r)? Thank you for any help here!

    • #73656

      Find ^n
      Replace with ^p

      (I think that’s what you want?)

    • #73657
      Aaron Troia
      Participant

      Just a note on Colleen’s Find/Change query, that will only work in a Text search, in a GREP search you would Find: \n and Replace with \r. It does exactly the same thing, just in GREP.

    • #73658

      Thanks, A.A. I am not yet schooled in the ways of GREP.

    • #73659

      Thank you Colleen and AA. Problem is, ALL of the lines, regardless of desired format, now end with \n. I’m trying to key off of a particular string (i.e., phone area code in parens). I can get the string through FIND but I then want to “let go” of part of what I found for the CHANGE.

    • #73671
      Aaron Troia
      Participant

      So it sounds like there is a lot of soft returns and you are wanting to clean them up as well as convert soft hyphens to hard hyphens? That’s kinda what it sounds like you’re saying with wanting to ” ‘let go’ of part of what you found for the CHANGE”

      This will find all the soft returns (\n+) followed by any word character (\w), non-word character (\W), or digit (\d), while using a positive lookbehind (?<=), and replace the soft returns with a single hard return.

      Find: \n+(?<=\W|\w|\d)
      Change: \r

      Is that more along the lines of what you’re looking for?

    • #73684
      Aaron Troia
      Participant

      Oops, I used a lookbehind (?<=) in my previous post when I should have used a lookahead (?=)

      Find: \n+(?=\W|\w|\d)
      Change: \r

Viewing 6 reply threads
  • You must be logged in to reply to this topic.
>
Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo