# REPLACE values after utmost left character

**URL:** https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090
**Category:** General Discussion
**Created:** [October 10, 2013, 12:26am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090 "2013-10-10T00:26:35Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fohrums](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8c91f0/32.png) [@fohrums](https://community.mp3tag.de/u/fohrums)
#### Post date: [October 10, 2013, 12:26am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/1 "2013-10-10T00:26:35Z")

</div>

I have a custom action list that replace various stuff such as:

FIELD: \_ALL  
On \> on  
Is \> is  
etc ....

my problem is some song titles have these words in the beginning of them so how can I use scripting functions to not have the the utmost left character be changed ![:huh:](https://community.mp3tag.de/uploads/default/original/1X/f15ee73c0fd9ec3b0db7481f0558638f8ee224ce.gif ":huh:")

---

<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: [October 10, 2013, 7:16am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/2 "2013-10-10T07:16:41Z")

</div>

If the replace is targeted at single words within a string, you can simply add a leading blank to the words - at the beginning of a field there should not be a blank.

---

<div class="post-metadata">

### Author: ![fohrums](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8c91f0/32.png) [@fohrums](https://community.mp3tag.de/u/fohrums)
#### Post date: [October 10, 2013, 7:38am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/3 "2013-10-10T07:38:56Z")

</div>

> [@ohrenkino](#):
>
> If the replace is targeted at single words within a string, you can simply add a leading blank to the words - at the beginning of a field there should not be a blank.

Give me an example?

one of my replace action rule is as follows:

[http://i.imgur.com/5QM4jxb.jpg](http://i.imgur.com/5QM4jxb.jpg)

what do I do?

---

<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: [October 10, 2013, 10:22am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/4 "2013-10-10T10:22:21Z")

</div>

> [@fohrums](#):
>
> Give me an example?
> 
> one of my replace action rule is as follows:
> 
> [http://i.imgur.com/5QM4jxb.jpg](http://i.imgur.com/5QM4jxb.jpg)
> 
> what do I do?

You have to judge if the replacements are a word of their own or part of a word.  
So, to replace the single "A" to "a" would mean that you look for " A " and replace it with " a ".  
If the "a" is the start of a word (like "and") then you would search for " A" and replace it with " a".  
Common to these examples is that the sought-after letter combination has a " " (=blank) in front - if the letter combination is found at the beginning of a field then there is no blank in front.  
Clear enough?

---

<div class="post-metadata">

### Author: ![fohrums](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8c91f0/32.png) [@fohrums](https://community.mp3tag.de/u/fohrums)
#### Post date: [October 11, 2013, 4:51am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/5 "2013-10-11T04:51:15Z")

</div>

> [@ohrenkino](#):
>
> letter combination has a " " (=blank) in front

I understand. The problem with MP3Tag "Replace" function is it doesn't recognize the space (character) ![:huh:](https://community.mp3tag.de/uploads/default/original/1X/f15ee73c0fd9ec3b0db7481f0558638f8ee224ce.gif ":huh:")

This doesn't work:

[http://i.imgur.com/S0w1qQo.jpg](http://i.imgur.com/S0w1qQo.jpg)

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [October 11, 2013, 6:12am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/6 "2013-10-11T06:12:27Z")

</div>

You have to uncheck [] only as whole word

Or instead of changing all your actions you could add one action that makes the first character upper case again.

---

<div class="post-metadata">

### Author: ![fohrums](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8c91f0/32.png) [@fohrums](https://community.mp3tag.de/u/fohrums)
#### Post date: [October 11, 2013, 8:07am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/7 "2013-10-11T08:07:13Z")

</div>

INTERESTING! I can't come up with a code that will identify that though? here's what I have so far (which I believe is the most appropriate method):

[http://i.imgur.com/z5j9qRg.jpg](http://i.imgur.com/z5j9qRg.jpg)

---

<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: [October 11, 2013, 8:15am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/8 "2013-10-11T08:15:44Z")

</div>

> [@fohrums](#):
>
> INTERESTING! I can't come up with a code that will identify that though? here's what I have so far (which I believe is the most appropriate method):
> 
> [http://i.imgur.com/z5j9qRg.jpg](http://i.imgur.com/z5j9qRg.jpg)

So you problem is not to have some words in lower case but to have the first letter of a field in upper case?  
For this see  
[/t/967/1](https://community.mp3tag.de/t/967/1)

---

<div class="post-metadata">

### Author: ![fohrums](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8c91f0/32.png) [@fohrums](https://community.mp3tag.de/u/fohrums)
#### Post date: [October 11, 2013, 8:47am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/9 "2013-10-11T08:47:00Z")

</div>

~Persay ![:unsure:](https://community.mp3tag.de/uploads/default/original/1X/cfaeba84fe6704387c5b34dfdd8172bd51b6f533.gif ":unsure:")

It's just I want to have only these following words lowercase unless it's not in the beginning of the field (most specifically %title%).

a|am|an|and|are|as|at|but|by|dj|mc|for|from|if|in|is|it|my|nor|of|or|on|the|to|s  
o|yet|your

so i'm still in a slump about this. What you mentioned earlier is perhaps the best fit for me, it's just I don't think there is a case conversion specific code for only specific character modification.

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [October 11, 2013, 9:27am UTC](https://community.mp3tag.de/t/replace-values-after-utmost-left-character/15090/10 "2013-10-11T09:27:17Z")

</div>

To make the first letter upper case use

_Action type:_ **Replace with regular expression**  
_Field:_ **\_ALL**  
_Regular expression:_ **^(\l)**  
_Replace matches with:_ **$upper($1)**

[x] case-sensitive comparison
