# Remove first instance of a character only

**URL:** https://community.mp3tag.de/t/remove-first-instance-of-a-character-only/65655
**Category:** Support
**Created:** [August 18, 2024, 12:43pm UTC](https://community.mp3tag.de/t/remove-first-instance-of-a-character-only/65655 "2024-08-18T12:43:26Z")
**Posts on this page:** 3
**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: [August 18, 2024, 12:43pm UTC](https://community.mp3tag.de/t/remove-first-instance-of-a-character-only/65655/1 "2024-08-18T12:43:26Z")

</div>

In the album field I have it formatted like this: **Sonoton SON 155 - Optimist - Documentary Themes And Underscores (1981)**

I would like to replace the first instance of "-" (the one after SON 155) with a "–", but keep the second "-" as is. How is this done?

---

<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: [August 18, 2024, 12:45pm UTC](https://community.mp3tag.de/t/remove-first-instance-of-a-character-only/65655/2 "2024-08-18T12:45:58Z")

</div>

Try  
`$regexp(%album%,(.*?) - (.*),$1 – $2)`

---

<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: [September 17, 2024, 12:46pm UTC](https://community.mp3tag.de/t/remove-first-instance-of-a-character-only/65655/3 "2024-09-17T12:46:12Z")

</div>

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