# Create action (s) to delete and insert text

**URL:** https://community.mp3tag.de/t/create-action-s-to-delete-and-insert-text/41805
**Category:** Support
**Created:** [May 28, 2018, 2:50pm UTC](https://community.mp3tag.de/t/create-action-s-to-delete-and-insert-text/41805 "2018-05-28T14:50:51Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [May 29, 2018, 4:52am UTC](https://community.mp3tag.de/t/create-action-s-to-delete-and-insert-text/41805/4 "2018-05-29T04:52:49Z")

</div>

> [@Beluna](#):
>
> Sample.  
> Programmed By [Drums] : Alex Hill  
> Backing Vocals : Force M.D.'s, Lee Peters, Michael Cooper  
> Engineer : David Houston  
> Producer, Arranged By, Written By :

provided it can be found in "subtitle" gets transformed with  
`$regexp(%subtitle%,\s+:\s+,': ')`

` "Programmed By [Drums] : Alex Hill  
Backing Vocals : Force M.D.'s, Lee Peters, Michael Cooper  
Engineer : David Houston  
Producer, Arranged By, Written By :"  
-\>

"Programmed By [Drums]: Alex Hill  
Backing Vocals: Force M.D.'s, Lee Peters, Michael Cooper  
Engineer: David Houston  
Producer, Arranged By, Written By :"`  
The last : is left out as there is nothing following - exactly as intended by the regular expression.  
So please check your implementation.  
The same applies to your complaints about #2(? Wasn't replacing the hyphen #2?)

So  
"Programmed By [Drums] : Alex Hill  
Backing Vocals : Force M.D.'s, Lee Peters, Michael Cooper  
Engineer : David Houston  
Producer, Arranged By, Written By :"  
becomes  
"Written By :"

.... adn didn't you get some similar advice years ago:

> [@How to remove white space](https://community.mp3tag.de/t/how-to-remove-white-space/17504/4):
>
> I'm missing something. first let me state this change goes under the field Performers So using your syntax how would i write the text(also, the words should be Capped Field: Performers Original Replace To look like so: Marcus Miller : Bass, Keyboard Thanks

If all that with the regular expression is too error-prone then try two simple replaces to get rid of the extra space around the colon:  
First action of the type "replace"  
Search: `<double blank>`  
Replace: `<single blank>`  
(where the term in \<\> means the space key)  
Second action of the type "Replace"  
Search: `<single blank>:`  
Replace: `:`

---

_[View the full topic](https://community.mp3tag.de/t/create-action-s-to-delete-and-insert-text/41805)._
