# Escaping the vertical pipe character in script

**URL:** https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078
**Category:** Web Sources Discussion
**Created:** [April 18, 2026, 11:12pm UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078 "2026-04-18T23:12:40Z")
**Posts on this page:** 6
**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: [April 18, 2026, 11:12pm UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078/1 "2026-04-18T23:12:40Z")

</div>

Greetings to all;

As the topic title implies: how to escape the vertical pipe character "|" during script processing?

As anyone who has ever fiddled with a WSS knows, the pipe character is used as a separator in multiple-field outputs in Mp3Tag. This means having a pipe contained in a string wreaks havoc during processing.

A search in the forum indicates using a backslash to escape the character; but this doesn't seem to work in specific regard to the pipe character, as the parser engine still considers a backslashed-escaped pipe as a valid separator.

I already have a workaround, with the use of the similar "[Halfwidth Forms Light Vertical](https://www.compart.com/en/unicode/U+FFE8)" or `$char(65512)`, but the question remains: is it possible (currently) to escape a pipe character, in a way that it doesn't interfere with normal WSS processing?

As an example of this, consider:

> **[TONIKAWA Season 2 | Opening (Setsuna no Chikai) - Single by Just Let That...](https://music.apple.com/jp/album/tonikawa-season-2-opening-setsuna-no-chikai-single/1886875085?l=en-US)**
>
> Album · 2026 · 1 Song

Thank you in advance.

---

<div class="post-metadata">

### Author: ![AreDigg](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@AreDigg](https://community.mp3tag.de/u/AreDigg)
#### Post date: [April 19, 2026, 12:36am UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078/2 "2026-04-19T00:36:52Z")

</div>

Replace with $verticalBar() doesn’t work?

---

<div class="post-metadata">

### Author: ![arb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arb](https://community.mp3tag.de/u/arb)
#### Post date: [April 19, 2026, 12:37am UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078/3 "2026-04-19T00:37:14Z")

</div>

There's a special command made up for web source scripts called `$verticalBar()` that's an internal representation of the pipe character `|` that doesn't create a separation/moves to the next track/interfering with your outputs. When your script gets to **Adjust Tags** , all instances of `$verticalBar()` are automatically changed back into `|` for your output.

The main use has been using the `replace` command to `replace "|" "$verticalBar()"` at the very start below `[ParserScriptAlbum]=...` which should then replace every instance of `|` found in your source's input, which by then is loaded into Current Position/pointer/ **Line and Position** /whatever to replace those instances.

Any time you want to insert `|` without creating a separation/moving to the next track, use `$verticalBar()`.

Escape characters can get funky because there's now different syntaxes in Mp3tag web sources, between web source commands using the backslash `\` then format strings in `UseFormat`/`SayFormat` commands using `'` and even regular expressions using `\`. It all still works though 😅

Your workaround works in the same way though.

(Also dangit @AreDigg, you beat me to it with a second to spare 🤣)

---

<div class="post-metadata">

### Author: ![AreDigg](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@AreDigg](https://community.mp3tag.de/u/AreDigg)
#### Post date: [April 19, 2026, 12:40am UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078/4 "2026-04-19T00:40:33Z")

</div>

> [@arb](#):
>
> (Also dangit @AreDigg, you beat me to it with a second to spare 🤣)

Sorry! 😂 But you have much more comprehensive answer.

---

<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: [April 19, 2026, 12:56am UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078/5 "2026-04-19T00:56:40Z")

</div>

> [@arb](#):
>
> $verticalBar()

Of course you're both correct, as is the [documentation](https://docs.mp3tag.de/tag-sources/development/) (which I forgot to check 😊):

```auto
For fields that have varying contents for tracks, e.g., `TITLE`, `TRACK`, or `ISRC`, Mp3tag expects the output buffer to contain the individual values separated and finalized by the pipe character `|`, e.g., `Title 1|Title 2|Title 3|`. Use `$verticalBar()` in case you need to emit the pipe character as content of a field. 

```

`$verticalBar()` doesn't make the most pleasant debug output string to look at, but that is the solution.  
@AreDigg as you were first, you get the "Solved" prize.

@arb you had the most complete answer, so you get an emoji prize 🏆.

And I get to rewrite my script...... again 😂 🫠  
Thank you all 👍

---

<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: [April 26, 2026, 12:57am UTC](https://community.mp3tag.de/t/escaping-the-vertical-pipe-character-in-script/71078/6 "2026-04-26T00:57:38Z")

</div>

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