# $replace()/$regex() breaks with %\_total\_size% (in export)

**URL:** https://community.mp3tag.de/t/replace-regex-breaks-with-total-size-in-export/12378
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [August 11, 2011, 7:43pm UTC](https://community.mp3tag.de/t/replace-regex-breaks-with-total-size-in-export/12378 "2011-08-11T19:43:21Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Qtax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/q/f05b48/32.png) [@Qtax](https://community.mp3tag.de/u/Qtax)
#### Post date: [August 11, 2011, 7:43pm UTC](https://community.mp3tag.de/t/replace-regex-breaks-with-total-size-in-export/12378/1 "2011-08-11T19:43:21Z")

</div>

**Export code example 1** :

```
%_total_size% => $replace(z0z %_total_size% z0z,0,X)

```

**Result** :

```
104,27 MB => z0z 104

```

**Expected** :

```
104,27 MB => zXz 1X4,27 MB zXz

```

**Problem** :  
No replacement at all and things after %\_total\_size% are not even included.

Export code example 2:

```
%_total_size% => $replace(z0z $trim(%_total_size%) z0z,0,X)

```

**Result** :

```
104,27 MB => zXz 1X4 zXz

```

**Expected** :

```
104,27 MB => zXz 1X4,27 MB zXz

```

**Problem** :  
%\_total\_size% does not have any unit nor decimal part.

Same behavior can be observed with $regex(), and I'm guessing other (string) functions. Is this bug by design?

---

_[View the full topic](https://community.mp3tag.de/t/replace-regex-breaks-with-total-size-in-export/12378)._
