Skip to main content

Topic: Convert command destination script - remove smart quotes (Read 589 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • boombass
  • [*][*]
Convert command destination script - remove smart quotes
Can anyone suggest a way to remove smart quotes (and replace them with dumb quotes) in track titles?

For example, change:

I’ve Got a Feeling

to

I've Got a Feeling

I'd like the change to happen when I use the "Convert" command. My current destination script for the Convert command is:

%album artist%/[$cut(%date%,4) - ]%album%/%discnumber%.%tracknumber% - %title%

How can I modify %title% to replace smart quotes with dumb quotes?

What if I want to do the reverse? Change dumb quotes to smart? This is probably harder...

Thanks!
  • Last Edit: 03 May, 2012, 11:29:42 AM by boombass

  • trout
  • [*][*][*][*]
Convert command destination script - remove smart quotes
Reply #1
Quote
How can I modify %title% to replace smart quotes with dumb quotes?

$replace(%title%,’,'')

Quote
$replace(a,b,c)

Replaces all occurrences of string b in string a with string c.

Can also be used with an arbitrary number of arguments. Note that $replace(a,b1,c1,b2,c2) is generally not the same as $replace($replace(a,b1,c1),b2,c2).

Example: $replace(ab,a,b,b,c) → "bc", $replace($replace(ab,a,b),b,c) → "cc"


note: The value of C in my example ['](apostrophe / single quote / dumb quote) is purposely doubled.
Quote
' (single quotation mark)

Inserts specified text bypassing syntax processing; allows special characters such as %,$,[,] to be inserted. In order to insert a quotation mark character, use '' (two single quotation marks).
  • Last Edit: 04 May, 2012, 10:21:58 AM by trout