# Cleaning Genre with regex

**URL:** <https://discourse.beets.io/t/cleaning-genre-with-regex/2386>\
**Category:** Help\
**Created:** [August 24, 2023, 10:09pm UTC](https://discourse.beets.io/t/cleaning-genre-with-regex/2386 "2023-08-24T22:09:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttghtg](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@ttghtg](https://discourse.beets.io/u/ttghtg)\
**Post date:** [August 24, 2023, 10:09pm UTC](https://discourse.beets.io/t/cleaning-genre-with-regex/2386/1 "2023-08-24T22:09:18Z")

</div>

Hello, I’d like to clean up the genre of my music library, as I often put multiple genres as that’s the way I listen to music according to my mood. Let’s say I have two albums with the genres `Funk; City-Pop` and `Rock; City-Pop`. I would like to batch modify them to `Funk; City Pop` and `Rock; City Pop` to remove the `-` character. Is it doable with just regexes? I was thinking that maybe a regex such as genre::“(group1) City-Pop (group2)” → “(group1) City Pop (group2)” ? I separate the different genres by `;`
