# Removing a specific pattern in one move

**URL:** https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008
**Category:** Support
**Created:** [June 9, 2024, 9:47pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008 "2024-06-09T21:47:28Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![cmach1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@cmach1](https://community.mp3tag.de/u/cmach1)
#### Post date: [June 9, 2024, 9:47pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/1 "2024-06-09T21:47:28Z")

</div>

I have a series of albums that have the same pattern that I'd like removed, but I don't know how to edit it smoothly in one move.

Here's an example of what I'd like edited:

**Editions Montparnasse 2000 MP 018 - Jazz Impressions 2 (1973)**

I'd like the zero before 18 removed and the year in parenthesis at the end also removed. So I have characters in the middle and at the end that need to be edited. I could eliminate the zero using combined $left and $right commands in Tag - Tag, but how do I also remove the year at the end?

---

<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: [June 9, 2024, 9:51pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/2 "2024-06-09T21:51:48Z")

</div>

Which field is this?  
If you want to delete data like

> [@cmach1](#):
>
> the year in parenthesis at the end also removed

don't you want to store that data in the field YEAR?

---

<div class="post-metadata">

### Author: ![cmach1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@cmach1](https://community.mp3tag.de/u/cmach1)
#### Post date: [June 9, 2024, 9:58pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/3 "2024-06-09T21:58:14Z")

</div>

In the album field. Also moving the year to the year field is something I hadn't considered, but if it's deleted from the album name I can just enter it manually in the year field.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [June 9, 2024, 10:21pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/4 "2024-06-09T22:21:41Z")

</div>

> [@cmach1](#):
>
> but if it's deleted from the album name I can just enter it manually in the year field.

Why don't manually when mp3tag can do it for you. Using the Action - Guess Value:  
Source: ALBUM  
Pattern: %dummy% (%year%)

Then you can remove that from the album field and edit the number out as well.

---

<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: [June 10, 2024, 5:17am UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/5 "2024-06-10T05:17:26Z")

</div>

> [@MotleyG](#):
>
> Using the Action - Guess Value:  
> Source: ALBUM  
> Pattern: %dummy% (%year%)

You could do both in 1 go:  
Using the Action - Guess Value:  
Source: %ALBUM%  
Pattern: %album% (%year%)

---

<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: [June 10, 2024, 5:19am UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/6 "2024-06-10T05:19:29Z")

</div>

> [@cmach1](#):
>
> I'd like the zero before 18 removed

You could use an action of the type "Replace" for ALBUM  
Search string: \_0  
Replace with: \_  
where the underscore here represents a space character that otherwise would not show.

And if you want to do it all in one move:  
Action of the type "Guess value"  
Source: `$replace(%album%, 0, )`  
Target pattern: %album% (%year%)

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [June 10, 2024, 11:56am UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/7 "2024-06-10T11:56:15Z")

</div>

> [@ohrenkino](#):
>
> Action of the type "Guess value"  
> Source: `$replace(%album%, 0, )`

I did not know that one could use the $replace function when identifying the source in an action. Definitely makes it faster with a single step. Fantastic!

---

<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: [June 10, 2024, 12:01pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/8 "2024-06-10T12:01:34Z")

</div>

"Guess values" features both: a generating format string and a matching format string.  
The generating one is the source where you can use variables, string constants and scripting functions to create the source string.  
And this string is - like the \_FILENAME for Convert\>Filename-Tag - the source that you structure in the matching format string of the target pattern.  
See also the documentation on format strings:

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

---

<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 10, 2024, 12:01pm UTC](https://community.mp3tag.de/t/removing-a-specific-pattern-in-one-move/65008/9 "2024-07-10T12:01:41Z")

</div>

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