old_contents: 'use strict';
  
  const _specialCharacters = [
    {
      chr: '\\',
      regexp: /\\/g
    }, {
      chr: '^',
      regexp: /\^/g
    }, {
      chr: '$',
      regexp: /\$/g
    }, {
      chr: '*',
      regexp: /\*/g
    }, {
      chr: '+',
      regexp: /\+/g
    }, {
      chr: '?',
      regexp: /\?/g
    }, {
      chr: '.',
      regexp: /\./g
    }
  ];
  
  const transformSpecialCharacters = function(token) {
    return _specialCharacters.reduce((transformedToken, special) => {
      return transformedToken.replace(special.regexp, '\\' + special.chr);
    }, token);
  };
  
  module.exports = transformSpecialCharacters;
  
new_contents: 'use strict';
  
  const transformSpecialCharacters = function(token) {
    return token.replace(/([\\^$*+?.])/g, '\\$1');
  };
  
  module.exports = transformSpecialCharacters;
  
subject: use regular expression instead of special character array