I just upgraded from RoboHelp 10 to 2017 (yes, a bit of a leap). While still using RH 10, I was asked to change all popup links in one of our projects to regular <a href> links that display in a window. Easy enough, searched and replaced, it was done.
Now I've upgraded to RH 2017 and need to perform the same search and replace in another project. However, now the same operation inserts an id attribute with a unique number on each link, which appears to make a global search and replace impossible, at least within RH. I think it's inserting extra quotation marks, also, which isn't helping matters.
Why can't I do a straight search and replace on the code without any HTML policing or whatever is going on? Or am I missing something?
I believe you have the ability to use wildcard characters in the Multi File Find and Replace tool.
My thought is that you could use the wildcards to overcome that "unique" bit of information that seems to be tripping you up.
Thanks for the response. I think it's more complicated than that. Here's an example using the glossary term "default." (We use a manual glossary, not RoboHelp's automated one.) Here it is as a popup. RoboHelp added the id attribute when it converted the project to RoboHelp 2017.
I've got 300 or so of these in this project, and they all must become regular links:
As I said before, it was simple in the old software, because the unique id attributes weren't there, and I think fewer quotation marks. Nor can I enter a partial string like
and replace it with
because the incomplete syntax causes a wreck. That is, text disappears, it inserts text that shouldn't be there, crazy stuff. The syntax wouldn't be incomplete if RoboHelp hadn't added the extra and unique stuff when it converted the project.
Also, I don't seem to have the same options as you do. I'm sure I could use wildcards if I could figure out how to apply them in this instance.
The dialog appears different because I displayed the Find tab and it's different than the Replace tab.
Using Regular Expressions would be a solution to this problem but there's a design problem doing that within RoboHelp. You can use regular expressions in the Find settings but not in the Replace settings. The solution to anything other than a manual edit has to be regular expressions using a tool other than RoboHelp. The freeware Text Crawler is one example. This does of course depend on whether you know how to use regular expressions. If not, maybe one of your developers could help? Not all developers are skilled in their use so don't take that as being part of their skillset.
You defined <a href="../Gloss/Default_g.htm">default</a> as what you want and if you remove what I have coloured red, that is what you get.
The regular expression would find the whole string and because of the way it is written, it would split it into five parts. In the Replace expression, it would delete parts two and four leaving one, three and five. The beauty of regular expressions is that they can capture strings such as _g and A3 even though the characters vary from one find to another.
Before embarking on this, create a backup first. You can wreck a project much quicker than you can create it. Warp speed by comparison. I always recommend creating the backup as a zip file. That prevents you opening it accidentally and working on it before you realise it was the backup. This way you always have a clean backup that can be used to create a new clean copy time after time.
See www.grainge.org for RoboHelp and Authoring information
Thanks for the reply, as always. I can see where regular expressions could work as you explain them and they sound very handy; however, they're certainly not in my skillset. I'll see if any of our developers are familiar with them. For this round, likely I'll be stuck doing these one by one, as we have a client deadline looming. There may be time for a few hours of focused, tedious clicking but not for gambles. I would like to explore regular expressions--they sound interesting. Thanks again!
This site might be useful when you have time to start exploring. Up to Shorthand Characters plus Grouping is probably more than enough for starters, then come back for anchors, the dot and lazy/greedy after you've had a chance to play around a bit (I still haven't got up to back references...) .
And this cheatsheet:
Also, I highly recommend TextCrawler. It has a nifty feature where you can enter some sample text and quickly see the effect of your expression, without actually running your Find/Replace.
Plus, you can save searches so you can run them again later. I once set this up and then copied it to colleagues when we were converting from RH to Flare (can I say that here? )
Thank goodness the several hundred in the other projects were done before I upgraded RH. However, I looked at a pre-RH upgrade version of this project, and I'll be darned, those id attributes were in there. Can't imagine why, since this project is just a spin-off of the others. So, I guess I can't blame the upgrade after all.
Anyway, I'll keep playing with it after I get the official version out the door. Thanks again, Peter and all.
First of all are you using RoboHelp's Find and Replace. The regular expression above will be found but you cannot use regular expressions in the Replace as RoboHelp does not include that option. You must use Text Crawler or something like that.
If you are happy plodding along with the manual approach, fine. If you need something different, let me know what is to be found.
See www.grainge.org for RoboHelp and Authoring information
You did say not to use RH Find and Replace, and obviously it didn't register. I'll try Text Crawler. Honestly, I can't take too much of a chance with it at this point, it's too late in the development cycle. I'd have to go into each topic to verify that it worked anyway, so might as well do a quick plod along manually. Great info, though, thank you very much. I'm saving this thread for future and am eager to give it a try when this deadline has passed.
Thank you for that info--will definitely check it out!
Well, that's true, isn't it? Having never needed those options before, I was unfamiliar with their location and non-location.