Page 1 of 1

Find text/Replace with variable

Posted: Tue Feb 08, 2022 6:40 am
by timlight10
Is it possible to Find/Replace and have the Replace text insert a variable? For example, I am porting over content from another platform. I would like to find every instance of the name of the product and then replace that with a variable that holds the product's name instead. So far, I've found 538 instances of the product's name...

Re: Find text/Replace with variable

Posted: Tue Feb 08, 2022 9:49 am
by timlight10
I got some great answers to this from the MadCap Slack workspace, so I will share them here:
that may be easier using a tool that supports regex (eg. Notepad++) that works directly on the HTML source.
You can select the “Find in source code” option. In the Find field, type your name you want replaced. In the Replace with field, type the code for the variable. Example: <MadCap:variable name=“ProdVarRSA.PNAutoFlow” />
I used the second suggestion, and that worked well except in a few edge cases that I was able to take care of quickly.