Find text/Replace with variable

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
timlight10
Jr. Propeller Head
Posts: 5
Joined: Sat Nov 13, 2021 7:42 am

Find text/Replace with variable

Post 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...
timlight10
Jr. Propeller Head
Posts: 5
Joined: Sat Nov 13, 2021 7:42 am

Re: Find text/Replace with variable

Post 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.
Post Reply