# Output referral and special characters

**URL:** https://community.mp3tag.de/t/output-referral-and-special-characters/67947
**Category:** Web Sources Discussion
**Created:** [March 23, 2025, 11:27pm UTC](https://community.mp3tag.de/t/output-referral-and-special-characters/67947 "2025-03-23T23:27:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)
#### Post date: [March 23, 2025, 11:27pm UTC](https://community.mp3tag.de/t/output-referral-and-special-characters/67947/1 "2025-03-23T23:27:39Z")

</div>

Here is some test code to help put my question in context:

```auto
	OutputTo "_var0"
	Say "{\"key0\":\"Scripting is \\\\\"hard\\\\\" work\","
	SayNewline
	Say "\"key1\":\"Scripting is \\\\\"HARD\\\\\" work\"}"
	RegexpReplace "^.*" "%_var0%"
	json "ON" "current"
	json_select "key1"
	SayRest

```

With this I _can_ get "`Scripting is "HARD" work`" in `_var0` output. What's interesting is the use of `RegexpReplace` to load the output's value:

```auto
Script-Line : ???
Command : regexpreplace
Parameter 1 : >^.*<
Parameter 2 : >{"key0":"Scripting is \\"hard\\" work",
"key1":"Scripting is \\"HARD\\" work"}<

Output : >{"key0":"Scripting is \\"hard\\" work",
"key1":"Scripting is \\"HARD\\" work"}<

Line and position:
{"key0":"Scripting is \"hard\" work",
"key1":"Scripting is \"HARD\" work"}

```

Notice that in [`"HARD"`] the double quote `"` special character -as part of the buffer string- is escaped, BUT inside the output memory there are 2 backslashes `\\`, and when loaded into the buffer there is only one `\`.

As I understand, the escape backslash for `"` is 'consumed' in order to preserve the special character, when loaded into the buffer.

My question is: is there a way to keep \*ALL\* characters when calling an output into the current buffer i.e. keeping the string _exactly_ as it sits in the output's memory?

Thank you in advance.

---

<div class="post-metadata">

### Author: ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)
#### Post date: [March 24, 2025, 1:55am UTC](https://community.mp3tag.de/t/output-referral-and-special-characters/67947/2 "2025-03-24T01:55:33Z")

</div>

> [@rboss](#):
>
> My question is: is there a way to keep _ALL_ characters when calling an output into the current buffer i.e. keeping the string _exactly_ as it sits in the output's memory?

[After a few hours of testing]: Yes, there is!  
Instead of a `RegexReplace`, a `Replace` command can do the same.... with some creativity:

```auto
RegexpReplace "^.*" "#"
Replace "#" "%_var0%"

```

This works. I used "#", but any suitable uncommon character will suffice.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [August 11, 2025, 2:34am UTC](https://community.mp3tag.de/t/output-referral-and-special-characters/67947/3 "2025-08-11T02:34:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
