# Remove apostrophes around words

**URL:** <https://community.mp3tag.de/t/remove-apostrophes-around-words/50536>\
**Category:** Support\
**Created:** [October 21, 2020, 5:50am UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536 "2020-10-21T05:50:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![123qweasd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/1/a9adbd/32.png) [@123qweasd](https://community.mp3tag.de/u/123qweasd)\
**Post date:** [October 21, 2020, 5:50am UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/1 "2020-10-21T05:50:06Z")

</div>

I have a few songs with words between apostrophes  
essentially looking for a regular expression (or other solution) to delete apostrophes when they surround a word;

Ex:  
'phases' should be  
phases

How can I accomplish this without deleting legitimate apostrophes (won't, can't, etc.) ?

Couldn't find something similar on the forum

Thanks for your assistance

---

<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:** [October 21, 2020, 7:37am UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/2 "2020-10-21T07:37:56Z")

</div>

I would create an action group with 2 actions of the type "Replace"  
one that searches for blank-apostrophe and replaces that with a blank,  
second one that searches for apostrophe-blank and replaces that with a blank.

I would assume that legitimate apostrophes are surrounded by real letters and have no leading or trailing space characters.

---

<div class="post-metadata">

**Author:** ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)\
**Post date:** [October 21, 2020, 1:54pm UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/3 "2020-10-21T13:54:08Z")

</div>

> [@ohrenkino](#):
>
> I would assume that legitimate apostrophes are surrounded by real letters and have no leading or trailing space characters

One exception, in English, is plural possessive nouns that end in 's'.  
For example:  
Witches' hats are usually pointed.

---

<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:** [October 21, 2020, 2:04pm UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/4 "2020-10-21T14:04:12Z")

</div>

So perhaps this works better:  
`$regexp(%text%,''(\w+)'',$1)`

---

<div class="post-metadata">

**Author:** ![123qweasd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/1/a9adbd/32.png) [@123qweasd](https://community.mp3tag.de/u/123qweasd)\
**Post date:** [October 21, 2020, 6:46pm UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/5 "2020-10-21T18:46:33Z")

</div>

Thanks for your feedback,  
I ended up using the following so it could also manage sentences;  
I've tried to account for the plural possesive exception, which works for most use cases, but you'll see an exception below:

'(\w[^']\*)'  
replace match with  
$1

'Bloc Party' - Hunting for Witches' hats 'Today'.mp3  
will become  
Bloc Party - Hunting for Witches' hats Today.mp3

and

'Bloc Party' - Huntin' for Witches' hats 'Today'.mp3  
will become  
Bloc Party - Huntin' for Witches' hats Today.mp3

however

'Bloc Party' - Don't go Looking for Witches' hats 'Today'.mp3  
will become  
Bloc Party - Dont Go Looking for Witches Hats Today.mp3

So I would essentially need to add something to the Regex which confirms that the first apostrophe must be the first character of a word.

I've tried this

\b'(\w[^']\*)'

but I think the first character can't be both \b AND apostrophe at the same time....  
But my knowledge of regex is limited so someone could probably jump in to finalize this.

Cheers,

---

<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:** [October 22, 2020, 2:34pm UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/6 "2020-10-22T14:34:34Z")

</div>

The more I look at it, the more the whole thing seems to aim at filenames.  
The best way to deal with filenames is to create them from the tags (again).  
This would eliminate at least the part with 'Bloc Party'.

---

<div class="post-metadata">

**Author:** ![123qweasd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/1/a9adbd/32.png) [@123qweasd](https://community.mp3tag.de/u/123qweasd)\
**Post date:** [October 22, 2020, 5:13pm UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/7 "2020-10-22T17:13:32Z")

</div>

No worries, I only keep artist & title tags and they are derived from filename once cleaned up. Chances are very remote that I'll ever come up with an exception so the regex above should be fine for 99.999% of occurrences... I'll manage the rest😁.  
Thx for your help!

---

<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:** [February 9, 2026, 12:28pm UTC](https://community.mp3tag.de/t/remove-apostrophes-around-words/50536/8 "2026-02-09T12:28:53Z")

</div>


