Replace/merge placeholders with another string?
===

I would like to be able to merge two strings in this fashion.  Is this possible using a regex?  (The base language I am using is Actionscript 3.0, but I can work with a more generic regex solution.)

Placeholder text: `__aXYZbc`

Char to add: `d`

Result: `_abXYZcd`

Another char to add: `e`

Result: `abcXYZde`

The idea is that `XYZ` (non-underscore) chars are fixed in place, and any additions are added as if a stack.  I imagine using a 3rd string: `___XYZ__` to maintain the placeholders.

