title: Maintaining GREP variables through find and replace
body: <p>I've recently taken on a project of document conversion to HTML. That is, a client gives me a .DOC file, and I need to convert the contents to one long HTML file - no styling, no CSS, just clean HTML with paragraph tags, header tags tags, etc.</p>
  
  <p>I found an application that does a pretty good job of automating the first part of it. The problem is that I need to do some advanced find and replace based on strings using variables.</p>
  
  <p>For instance, I have footnotes that were converted properly. They're currently displayed as superscript numbers with the 
  
  <p>I'd like to change how the footnote is displayed. Instead of a superscript number 6 for the 6th footnote, I'd like it to show (Note 6)</p>
  
  <p>To do that on the entire document (hundreds of footnotes), I'm wondering if I can do something like:</p>
  
  <p>FIND:</p>
  
  <pre><code>&lt;sup&gt;&lt;a name="FN[0-9]" href="FNR[0-9]"&gt;[0-9]&lt;/a&gt;&lt;/sup&gt;
  </code></pre>
  
  <p>REPLACE:</p>
  
  <pre><code>&lt;a name="FN%1" href="FNR%2"&gt;(Note %3)&lt;/a&gt;
  </code></pre>
  
  <p>The problem is, I can't find a Find and Replace tool that lets me maintain the variables in the replace area. All I get is the superscript 6 appearing as (Note %3), as well as every other footnote doing the same thing.</p>
  
  <p>Anyone have any ideas on how I can accomplish my task efficiently?</p>