# Adding space after set of letters

**URL:** https://community.mp3tag.de/t/adding-space-after-set-of-letters/13832
**Category:** General Discussion
**Created:** [September 2, 2012, 9:12pm UTC](https://community.mp3tag.de/t/adding-space-after-set-of-letters/13832 "2012-09-02T21:12:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paradajz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@paradajz](https://community.mp3tag.de/u/paradajz)
#### Post date: [September 2, 2012, 9:12pm UTC](https://community.mp3tag.de/t/adding-space-after-set-of-letters/13832/1 "2012-09-02T21:12:47Z")

</div>

I usually name my folders like this:

[CAT NR#] Artist - Album

Example:  
[BRR014] Neurodriver - Battledroid

I'm trying to make it look like this:  
[BRR 014] Neurodriver - Battledroid

I'm not really good with regular expressions so I'd appreciate some help.

---

<div class="post-metadata">

### Author: ![paradajz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@paradajz](https://community.mp3tag.de/u/paradajz)
#### Post date: [September 2, 2012, 10:21pm UTC](https://community.mp3tag.de/t/adding-space-after-set-of-letters/13832/2 "2012-09-02T22:21:30Z")

</div>

All right, after couple of hours I managed to do it!

Just looking at it makes me cry blood, but whatever:

$replace(%\_directory%,$regexp($left(%\_directory%,$strchr(%\_directory%,']')),\D,), $regexp($left(%\_directory%,$strchr(%\_directory%,']')),\D,))

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [September 3, 2012, 3:16am UTC](https://community.mp3tag.de/t/adding-space-after-set-of-letters/13832/3 "2012-09-03T03:16:22Z")

</div>

Is the number always three digits? If so, this action should do it.

_Action type:_ **Replace with regular expression**  
_Field:_ **\_DIRECTORY**  
_Regular expression:_ **^[(._)(\d{3})](._)$**  
_Replace matches with:_ **[$trim($1) $2] $trim($3)**  
[] _case-sensitive comparison_

---

<div class="post-metadata">

### Author: ![paradajz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@paradajz](https://community.mp3tag.de/u/paradajz)
#### Post date: [September 3, 2012, 6:31am UTC](https://community.mp3tag.de/t/adding-space-after-set-of-letters/13832/4 "2012-09-03T06:31:06Z")

</div>

Most of the times yes, but sometimes not. Thanks anyways!
