9 Replies Latest reply on Oct 16, 2006 3:11 AM by EileenPalsson

    Multi-File Find and Replace not working

    EileenPalsson Level 1
      I wish I could get I could have gotten Multi-File Find and Replace to ignore space. But I couldn't, and neither FAR nor BK ReplaceEm worked, either. So I've been deleting parts of tags bit by bit. Then I've opened each HTML file and clicked TrueCode to make RoboHelp delete whitespace from within tags. (I'm glad that works, at least!)

      What I'm left with is <font> tags all over the place. I thought that would be harmless, but for some reason those <font> tags make the font appear larger in compiled help.

      Unfortunately, Multi-File Find and Replace does not find these tags! I can't figure out why. It doesn't seem to be reloading the HTML, or something. (I mean, it is still searching the previous code, from before the whitespace removal.) Any suggestions?

      Thank you.
      /Eileen
        • 1. Re: Multi-File Find and Replace not working
          Peter Grainge Adobe Community Professional (Moderator)
          Hi Eileen

          I saw your other post when you said you hadn't been able to get FAR to work. I would have stepped in but you seemed to have found a solution that worked for you. So we are with a follow up.

          The problem you are hitting is how the various find and replace tools work. Many of them, RoboHelp included, will only find the string if it is on one line of your code. FAR and BK are different. With FAR the trick is to specify in the Advanced Find a small string that will always be on one line for the Starting With field and likewise in Ending With, then have something in Containing or Not Containing if you can. That will not be affected by white space.

          You refer to <font> tags but do you mean the tag is just that or that there is something else?

          You could start with <font and end with >. I think that would get ALL the font tags but you need to do a dummy run and have a backup. You would also need to do and find and replace on </font> as well. My concern in this is that often RH will work with Style and Span tags on things like this.

          Could you post some examples?

          • 2. Re: Multi-File Find and Replace not working
            EileenPalsson Level 1
            Hi,

            Thank you for the quick reply.

            As I said, I already removed whitespace by opening each topic and clicking RH's TrueCode tab. So the tags I'm searching for are on one line.

            None of the tools find <font> -- and I do mean only <font>, with no content within the tag.

            If I could just get <font> removed from the HTM files, RoboHelp would do the rest. (It automatically deletes </font> if there is no corresponding <font> tag.)

            Try it yourself -- insert a couple of <font> tags in your code. None of the programs find them. I'm baffled.

            I think I already got RoboHelp's corresponding Style and Span tags out. So that is not a concern at this point.

            Thanks
            /Eileen
            • 3. Re: Multi-File Find and Replace not working
              Peter Grainge Adobe Community Professional (Moderator)
              I surrounded some text with <font> and </font> and FAR found it without any trouble.

              How exactly are you using FAR?

              Also on the earlier problem, did you note the Ignore Multiple Spaces setting in FAR?

              • 4. Re: Multi-File Find and Replace not working
                EileenPalsson Level 1
                What the - ?

                I believe I am using FAR according to the instructions. I add the HTM files to the file list, type <font> into the Find Text box, select Replace but don't fill anything in the box, and click Start. Of course I ensured that Ignore Multiple Spaces setting is enabled (though in this case there are no spaces since RH removed them for me).

                What about RH's own tool? Did that work for you?

                I can't understand how these tools could NOT work. What could be simpler than finding <font> and replacing it with nothing?

                /Eileen
                • 5. Re: Multi-File Find and Replace not working
                  EileenPalsson Level 1
                  Update: I see now that when I open the HTM files in Notepad, the <font> tags do indeed still contain whitespace. RoboHelp's TrueCode tab is showing them without the whitespace. ARGH!

                  Here's what it looks like in Notepad:

                  <font

                  >

                  Now I understand why RH's Find and Replace tool is not working.

                  But I don't understand why FAR doesn't work.
                  /Eileen
                  • 6. Re: Multi-File Find and Replace not working
                    Peter Grainge Adobe Community Professional (Moderator)
                    I had to ask about the Ignore Multiple Spaces. We've all missed obvious settings at some point or other.

                    When you click Add files in FAR, are you just seeing the htm files listed?

                    Using the basic search, with just a Find and a Replace field, I have all the options on the right ticked. Then I hit Start and it works fine.

                    Something is fundamentally wrong as I struggled to understand why FAR didn't work with the original task.

                    If the above doesn't help, zip up one of your source files and email it to me. I will run the search to check that FAR does find <font>



                    • 7. Re: Multi-File Find and Replace not working
                      Peter Grainge Adobe Community Professional (Moderator)
                      You have posted while I was replying, hence being out of step.

                      As I explained earlier FAR will work across multiple lines but the Starting With has to be on one line.

                      Try

                      Starting With = <font

                      Ending With = >

                      but do a find only to start with and note what gets highlighted in FAR. I am concerned it might not quite work. Try first and let us know. If this doesn't work, we should be able to find something that does.

                      • 8. Re: Multi-File Find and Replace not working
                        Peter Grainge Adobe Community Professional (Moderator)
                        That will work. I just checked.

                        • 9. Re: Multi-File Find and Replace not working
                          EileenPalsson Level 1
                          Yep, it worked all right. And it would have stripped out all inline font formatting, as well, if I hadn't used "Not Containing".

                          An important point I learned today is that RH's TrueCode tab doesn't show me the code in the same way Notepad would. That's good to know!

                          Thank you for your help, Peter!
                          /Eileen