quot.sed 153 B

1234567
  1. s/"\([^"]*\)"/“\1”/g
  2. s/`\([^`']*\)'/‘\1’/g
  3. s/ '\([^`']*\)' / ‘\1’ /g
  4. s/ '\([^`']*\)'$/ ‘\1’/g
  5. s/^'\([^`']*\)' /‘\1’ /g
  6. s/“”/""/g