# Solution for dot after some letters

**URL:** https://community.mp3tag.de/t/solution-for-dot-after-some-letters/71410
**Category:** Support
**Created:** [June 8, 2026, 9:33am UTC](https://community.mp3tag.de/t/solution-for-dot-after-some-letters/71410 "2026-06-08T09:33:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![djrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@djrip](https://community.mp3tag.de/u/djrip)
#### Post date: [June 8, 2026, 9:33am UTC](https://community.mp3tag.de/t/solution-for-dot-after-some-letters/71410/1 "2026-06-08T09:33:50Z")

</div>

Some time ago I made a post (Original below) where I was seeking to convert anything with dots / periods after letters in the name to a one that still included the dots but also added the same word without, so

R.O.C.K. In The U.S.A became -\>

ROCK (R.O.C.K) In The USA (U.S.A)

I originally came up with a very complex solution involving temp strings, variables, etc. Now here's the regex version that involves 2 simple Replace With Regular Expressions

The 1st regex converts it to the desired format but adds trailing dots/periods, so the second regex removes / swaps it.

Expression 1: Captures any word up to 9 characters of X. (Additional letters added by "((\w)\.?)?"

```auto
((\w)\.)((\w)\.)((\w)\.?)((\w)\.?)?((\w)\.?)?((\w)\.?)?((\w)\.?)?((\w)\.?)?((\w)\.?)?

```

Used in Replace With Regular Expressions as:

$upper($2$4$6$8$10$12$14$16$18) $upper(($2.$4.$6.$8.$10.$12.$14.$16.$18))

Expression 2:

```auto
\.+\) 'Captures any number of \. before a \)

```

Used in Replace With Regular Expressions as:

```auto
\)

```

> [@Dot after some letters](https://community.mp3tag.de/t/dot-after-some-letters/13889/13):
>
> Thank. Hadn't thought of the replace and use period. That I can use. But still at a loss for the X.Y.Z.Z.Y to ==\> XTZZY (X.Y.Z.Z.Y) I'll keep looking

---

<div class="post-metadata">

### Author: ![Casual\_Tea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/casual_tea/32/18886_2.png) [@Casual\_Tea](https://community.mp3tag.de/u/Casual_Tea)
#### Post date: [June 8, 2026, 11:30am UTC](https://community.mp3tag.de/t/solution-for-dot-after-some-letters/71410/2 "2026-06-08T11:30:35Z")

</div>

I've played with this a bit since I enjoy writing regex.

The solution I've come up with is a single regex.  
Regex:

```auto
((?:([A-Z])\.([A-Z])\.(?:([A-Z])\.)?(?:([A-Z])\.)?(?:([A-Z])\.)?(?:([A-Z])\.)?(?:([A-Z])\.)?(?:([A-Z])\.)?(?:([A-Z])\.)?))

```

Replace with:

```auto
$2$3$4$5$6$7$8$9$10 ($1)

```

I've added a minimum length of 2 letters so it matches 2-9 uppercase letters in a row, each followed by a dot.

The only caveat is that the last letter also has to be followed by a `.`, otherwise it's not caught (see `U.S.A.` vs `U.S.A` below).

Here's what I've tested it with:

 ![regex101](https://community.mp3tag.de/uploads/default/original/3X/e/3/e3a6b74eb861c80c2350bb5c38bffeebf9a712a6.png)

---

<div class="post-metadata">

### Author: ![djrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@djrip](https://community.mp3tag.de/u/djrip)
#### Post date: [June 10, 2026, 7:51am UTC](https://community.mp3tag.de/t/solution-for-dot-after-some-letters/71410/3 "2026-06-10T07:51:37Z")

</div>

That's pretty nice & clean. The caveat is a bit of an issue for me. Some files don't have the required End DOT.

I did a whole bunch of testing and reconfiguring after this post, then read your post. I modifed and used your code in the solution.

\*\* I changed the initial key expression to LetterDOTLetter.

\*\* This changed the focus from Letter DOT... to DOT Letter... So once it finds the Key Expression, it only looks for the DOT Letter

\*\* I appended an optional DOT at the end in the modified Regex of yours. This means you don't need a second line to take it out in ACTIONS.

\*\* Kept/added/modified/deleted conditions in your code to avoid X.X. Surname. eg: F.R. David

\*\* Changed to allow lower case. eg: in B.o.B

New Code:

```auto
((?:([A-Z])\.([A-Za-z])(?![a-z]|\s[A-Za-z]|\.\s[A-Za-z])(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?(?:\.([A-Za-z]))?)|([A-Za-z])\.([A-Za-z])(?:(?=\.$)|(?=$)))\.?

```

Thanks for your idea.

 ![image](https://community.mp3tag.de/uploads/default/original/3X/b/0/b0d2144f347ad3b2fc6dda473580e59cbed5e2e4.png)

---

<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: [July 8, 2026, 7:52am UTC](https://community.mp3tag.de/t/solution-for-dot-after-some-letters/71410/4 "2026-07-08T07:52:32Z")

</div>

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