# Regex help needed

**URL:** https://community.mp3tag.de/t/regex-help-needed/7698
**Category:** Support
**Created:** [January 4, 2009, 1:28am UTC](https://community.mp3tag.de/t/regex-help-needed/7698 "2009-01-04T01:28:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nickodemos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@Nickodemos](https://community.mp3tag.de/u/Nickodemos)
#### Post date: [January 4, 2009, 1:28am UTC](https://community.mp3tag.de/t/regex-help-needed/7698/1 "2009-01-04T01:28:12Z")

</div>

What I would like is to have in the drop down of the Tag - Filename is a string that would allow me to move my files. IE:  
d:\musicWork\Boston - 1978 - Don't Look Back - 01 - Don't Look Back.mp3  
to  
d:\Music\B\Boston\Boston - 1978 - Don't Look Back (CBR 192)Rock\Boston - 1978 - Don't Look Back - 01 - Don't Look Back.mp3

What I have now is: d:\music\%artist% - %year% - %album% (%\_vbr% %\_bitrate%)%genre%\%artist% - %year% - %album% - $num(%track%,2) - %title%

Now I can do everything myself except the regex code for finding out the first letter of the band so that I can move it directly to D:\music\B\

Nickodemos

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [January 4, 2009, 5:33am UTC](https://community.mp3tag.de/t/regex-help-needed/7698/2 "2009-01-04T05:33:53Z")

</div>

> [@Nickodemos](#):
>
> ... Now I can do everything myself except the regex code for finding out the first letter of the band so that I can move it directly to D:\music\B\ ...

I think you do not need a regular expression to isolate the first letter of a tagfield, just use $left(x,n) function with n=1 to get the first character from the left side out of the tagfield string.

DD.20090104.0733.CET

---

<div class="post-metadata">

### Author: ![Nickodemos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@Nickodemos](https://community.mp3tag.de/u/Nickodemos)
#### Post date: [January 4, 2009, 5:55pm UTC](https://community.mp3tag.de/t/regex-help-needed/7698/3 "2009-01-04T17:55:40Z")

</div>

> [@DetlevD](#):
>
> I think you do not need a regular expression to isolate the first letter of a tagfield, just use $left(x,n) function with n=1 to get the first character from the left side out of the tagfield string.
> 
> DD.20090104.0733.CET

Yes that worked perfectly. I now use this:

d:\music$left(%artist%,1)\%artist% - %year% - %album%\%artist% - %year% - %album% - $num(%track%,2) - %title%

and it comes out just what I need. Thx for the fast reply.

Nickodemos

---

<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: [February 9, 2026, 12:21pm UTC](https://community.mp3tag.de/t/regex-help-needed/7698/4 "2026-02-09T12:21:16Z")

</div>


