# Action for removing the first X number of characters from field X

**URL:** https://community.mp3tag.de/t/action-for-removing-the-first-x-number-of-characters-from-field-x/14926
**Category:** General Discussion
**Created:** [July 25, 2013, 5:59pm UTC](https://community.mp3tag.de/t/action-for-removing-the-first-x-number-of-characters-from-field-x/14926 "2013-07-25T17:59:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tate13](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/f14d63/32.png) [@tate13](https://community.mp3tag.de/u/tate13)
#### Post date: [July 25, 2013, 5:59pm UTC](https://community.mp3tag.de/t/action-for-removing-the-first-x-number-of-characters-from-field-x/14926/1 "2013-07-25T17:59:21Z")

</div>

For example: I want to remove the first 4 characters from the Artist title after using the "Filename - Tag" action.  
Like this:

"01. Artist"

to:

"Artist"

So how would I create an action for that?

1. To remove the first/last X number of characters.

2. To remove whatever number of characters from a specific point of a field (for example the first three characters after the first four characters)

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: [July 26, 2013, 3:27am UTC](https://community.mp3tag.de/t/action-for-removing-the-first-x-number-of-characters-from-field-x/14926/2 "2013-07-26T03:27:51Z")

</div>

Several things:  
Why do you import the number at all? A mask  
%dummy%. %artist%  
would only use the string after the dot.

To get rid of the number you can either use an action of the type "Format value" and as format string $mid(%fieldname%,4,$len(%fieldname%))  
or an action of the type "replace with regular expression"  
Search string: "^\d+. "  
(leave out the inverted commas - they should just show you that there is a blank after the dot)  
Replace string:  
(leave empty)

The $mid-function lets you address more or less any position in a string.
