# how to justify the entries in a field?

**URL:** https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021
**Category:** General Discussion
**Created:** [March 3, 2010, 1:48pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021 "2010-03-03T13:48:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 3, 2010, 1:48pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021/1 "2010-03-03T13:48:00Z")

</div>

the entries in artist field are not aligned properly. some are left aligned while some are with a space, others are with two spaces like that. how can i get all of them aligned left? i mean to ask as how can i justify the entries in a particular field?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 3, 2010, 4:20pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021/2 "2010-03-03T16:20:45Z")

</div>

> [@evergreen1](#):
>
> some are with a space, others are with two spaces like that.

does that mean that you have leading blanks in front of the artist' s name?

Beginning of field is ^.  
so a replace with regular expression in the field artist and  
search pattern "^ " (without the quotation marks - but how do I make a blank visible?)  
and replace pattern "" (without the quotation marks - but how do I make "nothing" visible?)

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 3, 2010, 7:55pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021/3 "2010-03-03T19:55:43Z")

</div>

> [@ohrenkino](#):
>
> does that mean that you have leading blanks in front of the artist' s name?
> 
> Beginning of field is ^.  
> so a replace with regular expression in the field artist and  
> search pattern "^ " (without the quotation marks - but how do I make a blank visible?)  
> and replace pattern "" (without the quotation marks - but how do I make "nothing" visible?)

thank you very much. it works!

---

<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: [March 3, 2010, 10:37pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021/4 "2010-03-03T22:37:58Z")

</div>

Instead of making the leading spaces visible, you might simply create an Action to remove them and not worry about it.

What I do in the standard course of retagging anything is to run an Action Group that removes all leading and trailing spaces from common fields, and collapses multiple spaces into a single space. For my purposes, they're never significant and always unwanted. I do this for ARTIST, TITLE, ALBUM, and GENRE.

_Action type:_ **Format value**  
_Field:_ **ARTIST**  
_Format string:_ **$regexp($trim(%artist%),\s+, ,1)**

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 6, 2010, 9:47pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021/5 "2010-03-06T21:47:53Z")

</div>

thanks jjj for the suggestion

---

<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: [March 6, 2010, 9:59pm UTC](https://community.mp3tag.de/t/how-to-justify-the-entries-in-a-field/10021/6 "2010-03-06T21:59:01Z")

</div>

> [@evergreen1](#):
>
> thanks jjj for the suggestion

You're welcome. Either cut and paste the expression shown or make sure you have exactly one space character between the two commas on the right.

**$regexp($trim(%artist%),\s+, ,1)**
