Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Montreal, Quebec, Canada
    Posts
    261
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tricky Find and Replace (2000)

    I'm trying to sort out the network folders and make them more logical. I created a text file that maps out all the folders on the network. I've pasted it into Word (all 80 pages of the smeggin' thing). Now all I need do is apply the appropriate heading styles and use the (fantastic) Outline View to sort and rearrange them. The problem is trying to apply the appropriate headings using Find and Replace. For example, here's part of my text:
    +---Administration
    | +---Excel
    | +---Management meeting
    | +---Comp
    | | +---Admin
    | | +---AMS
    | | +---Canada
    | | | +---Admin
    | | | +---Analyse
    | | | +---AnalyseR
    | | | | ---2000
    +---ImplemGrp
    | +---Clients

    So, I want to find all instances of "+---", delete it and apply Heading 1 to the text. Sounds easy, but it's not because that string appears a LOT. I tried using the "^p" in front of that string to tell it to look for a line that begins with that string. It almost works but it does not delete the string and manages to apply Heading 1 to the line above as well. My brain hurts. I know there's a solution, but it's beyond me at the present time. Anyone care to take a crack at this problem?

    Thanks!
    Louis

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Tricky Find and Replace (2000)

    I can get there in about 5 replaces.

    When I copied the text into word it had manual line breaks, not paragraph marks, so the first was
    Find ^l replace with ^p
    This may only be due to how the text gets copied in and out of the lounge, so you may not need it.

    Then starting with the lowest level
    Find | | | +--- Replace with (space) format Heading 4
    Find | | +--- Replace with (space) format Heading 3
    Find | +--- Replace with (space) format Heading 2
    Find +--- Replace with (space) format Heading 1
    Find ^p (space) replace with ^p (no formatting)

    StuartR

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Montreal, Quebec, Canada
    Posts
    261
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tricky Find and Replace (2000)

    D'uh, yee! I never thought of going from the bottom up. That's just the sort of solution my brain was looking for. (Oh, you're right, those manual breaks are artifacts from this web site.)

    Thanks!

Posting Permissions

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