# How to separate or split strings that are written in one word?

**URL:** https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072
**Category:** Support
**Created:** [November 17, 2019, 4:14pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072 "2019-11-17T16:14:26Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Len44](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Len44](https://community.mp3tag.de/u/Len44)
#### Post date: [November 17, 2019, 4:14pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/1 "2019-11-17T16:14:26Z")

</div>

I've tried following the instructions in this post: [How to separate or split strings that are written in one word?](https://community.mp3tag.de/t/actions-and-batch-operations/967/12)  
But it doesn't seem to work. Mp3tag doesn't like the expression (\1) (\u): I get the message: "Invalid back reference: specified capturing group does not exist. The error occurred while parsing the regular expression: '(\>\>\>HERE\>\>\>\1) (\u)'."  
I tried replacing the "1" with the pipe symbol | because I thought is might be a typing error. The expression parses with the pipe symbol, but does nothing.  
Please help.  
Thanks.

---

<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: [November 17, 2019, 4:31pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/2 "2019-11-17T16:31:34Z")

</div>

> [@Len44](#):
>
> (\1) (\u):

You have to use the letter l (small L) and not the number 1.  
The same applies to your choice of the pipe symbol.  
This regular expression works as described  
`$regexp('TagsLikeThese ',(\w|,)(?=\u),$1 $2)`  
and this one also:  
`$regexp('TagsLikeThese ',(\l)(\u),$1 $2)`

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967/12):
>
> How to separate or split strings that are written in one word? You have titles that have no spaces between words (written in one big word) and all words start with a capital letter, e.g., ThisIsTheTitle (also referred to as CamelCase). How can Mp3tag separate the individual words and insert a space before every capital letter? Create a [new action group](https://community.mp3tag.de/t/actions/967/2), e.g., TagsLikeThese for the field you wish to edit (the example uses the TITLE field): Action type: Replace with regular expression Field: TI…

---

<div class="post-metadata">

### Author: ![Len44](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Len44](https://community.mp3tag.de/u/Len44)
#### Post date: [November 17, 2019, 4:39pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/3 "2019-11-17T16:39:53Z")

</div>

OK. Thanks.  
Of course, the u (uppercase) must be balanced by an l (lowercase). I've made the edit, the script parses, but it made no changes.  
This is what I'm trying to do: I have, for example, a song TITLE: "DoItAgainVer2". I want it to be: "Do It Again Ver 2". (I understand the digit might be a different problem. Let's ignore it for now.)  
How do I do that?  
Thanks again.

---

<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: [November 17, 2019, 4:42pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/4 "2019-11-17T16:42:29Z")

</div>

You have to show, preferably with a screendump, what you are doing.  
`$regexp('DoItAgainVer2',(\l)(\u),$1 $2)`  
leads to  
Do It Again Ver2

---

<div class="post-metadata">

### Author: ![Len44](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Len44](https://community.mp3tag.de/u/Len44)
#### Post date: [November 17, 2019, 4:48pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/5 "2019-11-17T16:48:39Z")

</div>

Hi -  
Yes, You've solved my problem brilliantly. And I see where I was wrong. Unfortunately, I've haven't describe the task very well. I want to change _multiple_ files like that.

 ![mp3tagscreen](https://community.mp3tag.de/uploads/default/original/2X/b/b8b5adb4244240d91fe0960f1192d93f8396f394.jpeg)  
You can probably see what I want.  
Thanks again.  
L

---

<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: [November 17, 2019, 5:35pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/6 "2019-11-17T17:35:08Z")

</div>

The expression should work for most of the titles.  
Select the files in the files list.  
Create an action of the type "Format value" or open the function Convert\>Tag-Tag  
Select as field: TITLE  
Enter as  
Format string: `$regexp(%title%,(\l)(\u),$1 $2)`  
Apply the function with OK.

---

<div class="post-metadata">

### Author: ![Len44](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Len44](https://community.mp3tag.de/u/Len44)
#### Post date: [November 17, 2019, 6:01pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/7 "2019-11-17T18:01:35Z")

</div>

It worked like a charm. Thank you so much!  
L

---

<div class="post-metadata">

### Author: ![Len44](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Len44](https://community.mp3tag.de/u/Len44)
#### Post date: [November 17, 2019, 6:06pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/8 "2019-11-17T18:06:55Z")

</div>

Is there as tutorial here that will help me learn how to write formulas/expressions like  
"$regexp(%title%,(\l)(\u),$1 $2)"?  
For example, I am familiar with a certain amount of programming, so I get the use of %%, but where are the variables $1 and $2 defined (if they are variables)? And the syntax of the backslashes, etc.  
Not asking for that information now, just please point me to where it is.  
Thanks.  
L

---

<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: [November 17, 2019, 6:10pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/9 "2019-11-17T18:10:29Z")

</div>

See e.g. the help (press F1)

> **[Replace with Regular Expression – Mp3tag Documentation](https://docs.mp3tag.de/actions/replace-regexp/)**
>
> Documentation on the Replace with Regular Expression action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

Or see this forum and the howtos on regular expressions.

> [@Regular Expressions](https://community.mp3tag.de/t/regular-expressions/521):
>
> This topic collects some useful regular expressions. If you created a regular expression which solves a common task, please post it here and give a short description what it is supposed to do. These regular expressions can be used with the action type Replace with regular expression. Please look at [FAQ: How do I create a new action?](https://community.mp3tag.de/t/967/1) to learn more about actions in Mp3tag. Important: The regular expressions are user-contributed solutions of individual tasks. Test with a copy of your files first…

---

<div class="post-metadata">

### Author: ![Canuname](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e9bcb4/32.png) [@Canuname](https://community.mp3tag.de/u/Canuname)
#### Post date: [December 5, 2025, 10:12pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/10 "2025-12-05T22:12:32Z")

</div>

This script works really well whenever you're using it in the tag. To tag format. But when you try to use this same exact logic and an action, it does not work correctly. What's the work around to get it to work in an action?

---

<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: [December 5, 2025, 10:15pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/11 "2025-12-05T22:15:14Z")

</div>

> [@Canuname](#):
>
> What's the work around to get it to work in an action?

It works in any action that allows a generating format string. The most versatile in this case would be an action of the type "Format value".

---

<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: [January 4, 2026, 10:15pm UTC](https://community.mp3tag.de/t/how-to-separate-or-split-strings-that-are-written-in-one-word/47072/12 "2026-01-04T22:15:50Z")

</div>

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