# Remove all text after specific character(s)

**URL:** https://community.mp3tag.de/t/remove-all-text-after-specific-character-s/14409
**Category:** Support
**Created:** [January 31, 2013, 7:44am UTC](https://community.mp3tag.de/t/remove-all-text-after-specific-character-s/14409 "2013-01-31T07:44:31Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [January 31, 2013, 9:24am UTC](https://community.mp3tag.de/t/remove-all-text-after-specific-character-s/14409/2 "2013-01-31T09:24:36Z")

</div>

> [@TMan459](#):
>
> ... I'd like to cut all text to the right of a defined character.  
> Example:  
> My genre field has w/o quotes "Folk Rock\\Another\\A Third"  
> I want to make it so that genre field reads "Folk Rock".  
> I want to remove all text to the right before the first "".  
> Hoping to get some guidance! Thanks!

It looks like as you want to reduce a multi-value tag-field GENRE to a standard single-value tag-field GENRE, while keeping the first value item from the multi-value tag-field GENRE.

You can try this ...  
Converter: "Tag - Tag" or Action: "Format value"  
Field: GENRE  
Format string: **$regexp($meta\_sep(GENRE,';'),'^(.+?);.\*$','$1\\')**  
... or simpler ...  
Format string: **$meta(GENRE,0)'\\'**

From:  
(multi-value)  
GENRE=Folk Rock  
GENRE=Another  
GENRE=A Third  
To:  
(single-value)  
GENRE=Folk Rock

See also this bug note ...  
[/t/12626/1](https://community.mp3tag.de/t/12626/1)

DD.20130131.1119.CET

---

_[View the full topic](https://community.mp3tag.de/t/remove-all-text-after-specific-character-s/14409)._
