# How to use Beyond Compare to confirm 100% replacement

Situation: It is easy to imagine having a pair of folders where every instance of path="**development**/js/magister.js"  was supposed to have been replaced with path="**production**/js/magister.js".  We want to inspect to confirm that all of the replacements actually occurred.&#x20;

Or in generic terms, you want to view the text in two files to confirm APPLE in File 1 was reliably replaced with ORANGE in File 2.

The solution in Beyond Compare is to first, make a replacement rule.  Then, make a grammar rule for a Beyond Compare File Format.

Step 1: At first the file looks like this.  Because the second file is meant for production, every path has been changed to say production.  The problem is, Lines 1, 3, 4, 5 should show up as beige and Line 2 should show up red, because it is the only bad line.

![](/files/-LnYTu6uvPCx1_5_Lwpq)

Step 2: In the Beyond Compare menu go to `Tools->Replacements`.&#x20;

![](/files/-LnYTyGhm3wmOgShbxqy)

Step 3: In the Beyond menu `Tools->FileFormats`

![](/files/-LnYUSsa1bJmxLUFkeoT)

Step 4: From now on, whenever you want to compare two files, use the dropdown to force your new format on the right pane only. And we see Line 2 is now the ONLY difference. Done!

![](/files/-LnYUamfXUC5vDX0tHOl)

To save these steps permanently go to `Session->SaveSession`.  In the future, you can resume these settings by going to `Session->OpenSession`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beyondcompare.gitbook.io/project/text-compare/replacement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
