# How to lowercase prepositions

**URL:** <https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648>\
**Category:** Support\
**Created:** [July 23, 2023, 2:32pm UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648 "2023-07-23T14:32:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)\
**Post date:** [July 23, 2023, 2:32pm UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/1 "2023-07-23T14:32:21Z")

</div>

Good morning.  
I'm using an action to transform the preposition to lowercase.  
Using the three rules below, I was able to do this for single words, and for words after the "-".  
How do I, or how would the action be, to transform into lowercase, words that come before (that is, that precede) punctuation and special signs:  
: = \> . , ; ) ] }  
Example:  
Anarchic System - See **M** e, Hear **M** e.mp3  
(change to)  
Anarchic System - See **m** e, Hear **m** e.mp3

Using:  
(?\<=\w\s)(a|an|as|at|and|but|by|de|for|from|in|it|me|nor|of|off|on|onto|or|so|the|to|up|yet)(?=\s) =\> lower($0)  
(?\<=\w\s)(a|an|as|at|and|but|by|de|for|from|in|it|me|nor|of|off|on|onto|or|so|the|to|up|yet)($) =\> lower($0)  
(?\<=\w\s)(a|an|as|at|and|but|by|de|for|from|in|it|me|nor|of|off|on|onto|or|so|the|to|up|yet) =\> lower($0)

I got:  
Anarchic System - See **M** e, Hear **m** e.mp3

Thanks

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [July 23, 2023, 2:54pm UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/2 "2023-07-23T14:54:26Z")

</div>

You want to write all the letters and words from this list  
`a|an|as|at|and|but|by|de|for|from|in|it|me|nor|of|off|on|onto|or|so|the|to|up|yet`  
always in lowercase, if they are followed by one of this characters?  
`: = > . , ; ) ] }`

To get for example:

Say A.mp3  
-\> `Say a.mp3`

Say A).mp3  
-\> `Say a).mp3`

Say A. point.mp3  
-\> `Say a. point.mp3`

The: One  
-\> `the: one.mp3`

---

<div class="post-metadata">

**Author:** ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)\
**Post date:** [July 24, 2023, 2:08am UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/3 "2023-07-24T02:08:01Z")

</div>

Yes, because it is a preposition.  
example:  
My Life Is (The) Love =\> My Life Is (the) Love  
See Me, Hear Me =\> See me, Hear me  
This Is [THE] Love Of My Live =\> This Is [the] Love of My Live

I don't want to capitalize the prepositions/words below:

a an and as at but by de for from in into it me nor of off on onto or so the to up yet

---

<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:** [July 24, 2023, 5:48am UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/4 "2023-07-24T05:48:18Z")

</div>

I would have thought that if you want to replace 1 string constant with another, then a simple replace would be enough: Action of the type "Format value" for \_FILENAME  
Format string: `$replace(%_filename%), A , a , An, an)`  
(and up to 30 more pairs).  
The problem of capitalized words following non-alphabetical characters can be handled with an action of the type "Case conversion" in which you can say which characters should be treated as word boundary - and if you set only the space character, then every other character would lead to a lower case character. This action should be run first, followed by the replace function.

> [@JoaoBC](#):
>
> : = \> . , ; ) ] }

I wonder when `:` and `>` should appear in a filename ... AFAIK the : is only valid to separate the drive letter and the `>` is used to redirect output to a file.

Just a word on language:  
According to this site, there are 150 prepositions.

> **[Everything You Need To Know About Prepositions — iTEP](https://www.itepexam.com/everything-you-need-to-know-about-prepositions/)**
>
> Most English speaking people recall only a handful of common prepositions, but in reality, there are about 150 different prepositions. Three of these prepositions are in the top ten most commonly used words in the English language: of, to, and in....

![prepositions](https://community.mp3tag.de/uploads/default/original/2X/e/e37401c52e8d4c1ad15e4f68388d85d9b394d755.gif)  
Your list is missing some of them but features some words that are no prepositions.

---

<div class="post-metadata">

**Author:** ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)\
**Post date:** [July 24, 2023, 11:21am UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/5 "2023-07-24T11:21:30Z")

</div>

Good morning!  
I also use it in the %title% field, not just the filename.  
Just as I convert '' to ',' I also convert ':' to ';'  
In fact, I needed to know which symbol represents "any character", just like in windows explorer it is represented by '?' for any character (except space). So I would use (a|an|the)(?)  
I already learned that space is represented by (\s) and letter by [a-z].  
I don't know if [a-z] only represents a lowercase letter or if it represents both lowercase and uppercase, and I don't know if there is a way to represent only characters like ( ] ? at the beginning and end of the word, ex: [The The}  
How to represent any accented letter (é ã ç ñ).  
These "basic" things would make it easier for us to create the conversion rules.

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [July 24, 2023, 11:35am UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/6 "2023-07-24T11:35:33Z")

</div>

> [@JoaoBC](#):
>
> any character (except space).

I recommend to read a Regular Expression Tutorial like [this](https://regexone.com/lesson/wildcards_dot).  
There is no specific symbol for "any character except space". But you can combine them to `[^]`  
_(Please be aware that "anything" would also include a tabulator, line breaks, hard spaces...)_

There is one for "any character", a dot `.`  
And there is one for a space `\s`

> [@JoaoBC](#):
>
> I don't know if [a-z] only represents a lowercase letter

Yes. If you want to include uppercase characters too it would be [A-Z]. Combined [a-zA-Z].

> [@JoaoBC](#):
>
> at the beginning and end of the word

The beginning of a string is represented by a `^`  
The end of a string is represented by a `$`  
Some people call them anchors.

> [@JoaoBC](#):
>
> How to represent any accented letter (é ã ç ñ).

There is no easy way for this because there a countless combinations out there.

All this has nothing to do with Mp3tag. Please read one or more tutorials about [regular expressions](https://www.regular-expressions.info/quickstart.html).

Little snippet from the second tutorial:

 ![image](https://community.mp3tag.de/uploads/default/original/2X/8/8cee448dcb805adfc96b855aebe671427cef0d9b.png)

Also the documentation for Mp3tag offers some basic introduction:

> **[Regular Expressions – Mp3tag Documentation](https://docs.mp3tag.de/regex/)**
>
> Documentation on support for regular expressions in Mp3tag. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

**Author:** ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)\
**Post date:** [July 25, 2023, 6:03am UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/7 "2023-07-25T06:03:57Z")

</div>

My friends, thank you very, very much for the tips and the links.  
With these tips and the tips from the links, I did it.  
I created two examples for testing, and it worked:  
%title%  
(The) The, There (The).  
The There The, The The.

After using the actions at the end of this text (below), it looks like this:  
(The) the, There (the).  
The There the, the the.

These are examples that don't exist, just to test, because many titles are in my language (Brazilian Portuguese).

Actions:  
Replace With Regular Expression

Regular Expression:  
`(?<=\s)(a|an|and|as|at|but|by|de|for|from|in|into|it|me|nor|of|off|on|onto|or|so|the|to|up|yet)(?=\s)`  
Replace Matches With:  
`$lower($0)`

Regular Expression:  
`(?<=\s)(a|an|and|as|at|but|by|de|for|from|in|into|it|me|nor|of|off|on|onto|or|so|the|to|up|yet)(\b)`  
Replace Matches With:  
`$lower($0)`

Regular Expression:  
`(?<=\s)([&\(\{\[\+\=])(a|an|and|as|at|but|by|de|for|from|in|into|it|me|nor|of|off|on|onto|or|so|the|to|up|yet)(\b)`  
Replace Matches With:  
`$lower($0)`

This part:` (?<=\s)`  
In all expressions it is necessary, so that the first word of the %title% is not lowercase, even if it is in parentheses.

---

<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:** [August 24, 2023, 6:04am UTC](https://community.mp3tag.de/t/how-to-lowercase-prepositions/61648/8 "2023-08-24T06:04:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
