# Add option to Replace Variables limiting the macro syntax used

**URL:** https://www.finalbuilder.com/forums/t/add-option-to-replace-variables-limiting-the-macro-syntax-used/7715
**Category:** Feature Requests
**Created:** [September 20, 2025, 3:55pm UTC](https://www.finalbuilder.com/forums/t/add-option-to-replace-variables-limiting-the-macro-syntax-used/7715 "2025-09-20T15:55:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![uraabe](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/uraabe/32/2502_2.png) [@uraabe](https://www.finalbuilder.com/forums/u/uraabe)
#### Post date: [September 20, 2025, 3:55pm UTC](https://www.finalbuilder.com/forums/t/add-option-to-replace-variables-limiting-the-macro-syntax-used/7715/1 "2025-09-20T15:55:44Z")

</div>

I have a text file used by Delphi full of variables written like $(variablename). The file also contains macros written like %macroname%. Now when I execute a Replace Variables action on the file I have to escape all the $(xxx) variables to keep them untouched in case the variable name matches one of the FinalBuilder ones.

Can you please add an option to limit the variable replacement to those written in the %xxx% style?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 22, 2025, 1:22am UTC](https://www.finalbuilder.com/forums/t/add-option-to-replace-variables-limiting-the-macro-syntax-used/7715/2 "2025-09-22T01:22:21Z")

</div>

Done 🙂

[https://downloads.finalbuilder.com/downloads/finalbuilder/850/FB850\_3502.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/850/FB850_3502.exe)

At first I thought it would be simple, add another overload and pass an options object in - 4hrs and 2 false starts later… there are multiple layers of abstraction before we get to the parser (each layer adds functionality) - in then I gave up battling delphi’s overload resolution issues and added a new method and an options type at each level to drill the options down to the parser - the actual change to the parser was just a few lines.

While I was at it, I added an option to ignore % expressions too - because why not 😏

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 26, 2025, 7:21am UTC](https://www.finalbuilder.com/forums/t/add-option-to-replace-variables-limiting-the-macro-syntax-used/7715/3 "2025-09-26T07:21:31Z")

</div>

Hi Uwe

We discovered a regression in the build I posted last week, please update to this build

[https://downloads.finalbuilder.com/downloads/finalbuilder/850/FB850\_3508.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/850/FB850_3508.exe)
