To remove any space in front or behind the colon except one:
Use an action of the type "Format value"
Format string: $regexp(%fieldname%,\s+:\s+,': ')
To replace a hyphen
Action of the type "Replace" for the field
Search string: -
Replace string:
(a blank)
To remove anything in front of "Written":
Action of the type "Replace with regular expression" for the field,
Search string: .*Written
Replace: Written
I won't prolong the issue
The $regexp(%fieldname%,\s+:\s+,': ') solution doesn't work. Simply removes everything the entire field.. I'm using it as a stand alone action, to insure no other actions are interfering.
Sample.
Programmed By [Drums] : Alex Hill
Backing Vocals : Force M.D.'s, Lee Peters, Michael Cooper
Engineer : David Houston
Producer, Arranged By, Written By :
#2. *Written using the example above only removes the space anot everything in front.
I did however change the Written-By..
Any suggestions. If not, thanks
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:
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: :