# Positioning "added text" at a specific point within Title text

**URL:** https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997
**Category:** Support
**Created:** [September 21, 2024, 6:14am UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997 "2024-09-21T06:14:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![djScottie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djScottie](https://community.mp3tag.de/u/djScottie)
#### Post date: [September 21, 2024, 6:14am UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/1 "2024-09-21T06:14:52Z")

</div>

I would like to insert an abbreviated DJ Service identifier, i.e. [SI], in the Title, but ensure that it's placed immediately after the song title, but before any following text.

_Here is my example._  
Often the title of a track has things after the actual title like:  
**Song Title (Remix) (Clean) 120 bpm**  
**Song Title [Spinmaster Medley] (Clean) 120 bpm**

Other times, it's just the **Title**.

Can an action with regular expression tools insert " [SI]" at the end of a line, when it's just a title, but position it before any existing "open parentheses "(" or open-brackets "[" when they exist.

Thanks for any help!  
(And yes, I did the best search of the forums I could, before posting.)

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [September 21, 2024, 6:26am UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/2 "2024-09-21T06:26:42Z")

</div>

> [@djScottie](#):
>
> Often the title of a track has things after the actual title like:  
> **Song Title (Remix) (Clean) 120 bpm**

Are we really talking about the title (title tag-field) or is your example the filename?

---

<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: [September 21, 2024, 8:38am UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/3 "2024-09-21T08:38:52Z")

</div>

> [@djScottie](#):
>
> Can an action with regular expression tools insert " [SI]" at the end of a line, when it's just a title, but position it before any existing "open parentheses "(" or open-brackets "[" when they exist.

Maybe this is possible with a very complicated regular expression.  
I suggest to do it in two steps:

First use an Action "Replace with regular expression" like this:  
 ![image](https://community.mp3tag.de/uploads/default/original/3X/3/6/36196541f0643ad4a3155a795840275525c41584.png)

Format string:  
`(\(|\[)(.*(\)|\]))`  
 ![image](https://community.mp3tag.de/uploads/default/original/3X/9/6/96d54815b82e44238de4888ebd051513876a17c8.png)  
Replace matches with:  
`[SI] $1$2`

This would add `[SI]` and a space in front of the first opening bracket or opening square bracket.

* * *

For the second step, [Filter](https://docs.mp3tag.de/filter/) F3 your songs for all TITLE content that has not yet your [SI] added:  
`NOT %TITLE% HAS [SI]`

Then use another Action like "Format value"  
with a Format string:  
`%TITLE% '['SI']'`  
_(the square brackets need a special syntax)_  
 ![image](https://community.mp3tag.de/uploads/default/original/3X/9/9/9916d6c1b7b18bb1ae0195a6992948a948880f35.png)  
This would add a space and `[SI]` at the end of the existing TITLE content.

Please test it carefully with various possible TITLEs from your collection.

**Hint** :  
You can NOT use the regular expression twice for the same TITLE.  
It would add [SI] again and again.

---

<div class="post-metadata">

### Author: ![djScottie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djScottie](https://community.mp3tag.de/u/djScottie)
#### Post date: [September 21, 2024, 11:35am UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/4 "2024-09-21T11:35:45Z")

</div>

Yes, the Title (tag-field). Once I have the Artist and Title tag fields cleaned up, I use the Tag-\>Filename converter to make a cleaner/shorter file name.

---

<div class="post-metadata">

### Author: ![djScottie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djScottie](https://community.mp3tag.de/u/djScottie)
#### Post date: [September 21, 2024, 12:03pm UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/5 "2024-09-21T12:03:43Z")

</div>

**@LyricsLover, the process worked perfectly.** Here are the steps that yielded perfect Titles! (I added a "Replace" action as the last step in case I somehow create a double [Abbr] [Abbr].)

1. Regular Expression
2. Filter out newly changed "Titles"
3. Format String
4. (Added) Replace "double occurrences"

---

<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: [September 21, 2024, 12:08pm UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/6 "2024-09-21T12:08:37Z")

</div>

Thanks for your feedback.

Before the next execution of the regular expression, I recommend that you first use a filter that only lists songs with a TITLE that do not yet contain [SI] or another used [Abbr].  
This also reduces the risk of creating "double occurrences".

---

<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: [October 21, 2024, 12:09pm UTC](https://community.mp3tag.de/t/positioning-added-text-at-a-specific-point-within-title-text/65997/7 "2024-10-21T12:09:03Z")

</div>

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